diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 11:45:29 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 11:45:29 +0000 |
commit | b42910f2a08d5eb08015f202c18bb05af1575125 (patch) | |
tree | 61b4c0ef2390fab101fa8d2f0f47a48ef77d2c45 /ash/scoped_target_root_window.h | |
parent | 44ea8c724f68466ba84a574540f799085b69871e (diff) | |
download | chromium_src-b42910f2a08d5eb08015f202c18bb05af1575125.zip chromium_src-b42910f2a08d5eb08015f202c18bb05af1575125.tar.gz chromium_src-b42910f2a08d5eb08015f202c18bb05af1575125.tar.bz2 |
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
Diffstat (limited to 'ash/scoped_target_root_window.h')
-rw-r--r-- | ash/scoped_target_root_window.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ash/scoped_target_root_window.h b/ash/scoped_target_root_window.h new file mode 100644 index 0000000..ab695be --- /dev/null +++ b/ash/scoped_target_root_window.h @@ -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_ |