forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
open new window in the same root window where the launcher was in
* Introduced ScopedRootWindowActivator to temporarily switch active root window. BUG=241571 TEST=covered by test Review URL: https://chromiumcodereview.appspot.com/19945008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215000 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
oshima@chromium.org
committed
Aug 1, 2013
1 parent
44ea8c7
commit b42910f
Showing
9 changed files
with
291 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
#include "ash/scoped_target_root_window.h" | ||
|
||
#include "ash/shell.h" | ||
|
||
namespace ash { | ||
namespace internal { | ||
|
||
ScopedTargetRootWindow::ScopedTargetRootWindow( | ||
aura::RootWindow* root_window) { | ||
Shell::GetInstance()->scoped_target_root_window_ = root_window; | ||
} | ||
|
||
ScopedTargetRootWindow::~ScopedTargetRootWindow() { | ||
Shell::GetInstance()->scoped_target_root_window_ = NULL; | ||
} | ||
|
||
} // namespace internal | ||
} // namespace ash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
#ifndef ASH_SCOPED_TARGET_ROOT_WINDOW_H_ | ||
#define ASH_SCOPED_TARGET_ROOT_WINDOW_H_ | ||
|
||
#include "base/basictypes.h" | ||
|
||
namespace aura { | ||
class RootWindow; | ||
} | ||
|
||
namespace ash { | ||
namespace internal { | ||
|
||
// Constructing a ScopedTargetRootWindow allows temporarily | ||
// switching a target root window so that a new window gets created | ||
// in the same window where a user interaction happened. | ||
// An example usage is to specify the target root window when creating | ||
// a new window using launcher's icon. | ||
class ScopedTargetRootWindow { | ||
public: | ||
explicit ScopedTargetRootWindow(aura::RootWindow* root_window); | ||
~ScopedTargetRootWindow(); | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(ScopedTargetRootWindow); | ||
}; | ||
|
||
} // namespace internal | ||
} // namespace ash | ||
|
||
#endif // ASH_SCOPED_TARGET_ROOT_WINDOW_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.