Chromium Code Reviews| Index: ash/common/scoped_root_window_for_new_windows.h |
| diff --git a/ash/scoped_target_root_window.h b/ash/common/scoped_root_window_for_new_windows.h |
| similarity index 51% |
| rename from ash/scoped_target_root_window.h |
| rename to ash/common/scoped_root_window_for_new_windows.h |
| index b732e40280766f6edefe2022d9a20de3abab3b29..e493f8b586ccdd6660fbc6e474e4a9d328b18b25 100644 |
| --- a/ash/scoped_target_root_window.h |
| +++ b/ash/common/scoped_root_window_for_new_windows.h |
| @@ -2,32 +2,32 @@ |
| // 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_ |
| +#ifndef ASH_COMMON_SCOPED_ROOT_WINDOW_FOR_NEW_WINDOWS_H_ |
| +#define ASH_COMMON_SCOPED_ROOT_WINDOW_FOR_NEW_WINDOWS_H_ |
| #include "ash/ash_export.h" |
| #include "base/macros.h" |
| -namespace aura { |
| -class Window; |
| -} |
| - |
| namespace ash { |
| -// Constructing a ScopedTargetRootWindow allows temporarily |
| +class WmWindow; |
| + |
| +// Constructing a ScopedRootWindowForNewWindows 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 ASH_EXPORT ScopedTargetRootWindow { |
| +class ASH_EXPORT ScopedRootWindowForNewWindows { |
| public: |
| - explicit ScopedTargetRootWindow(aura::Window* root_window); |
| - ~ScopedTargetRootWindow(); |
| + explicit ScopedRootWindowForNewWindows(WmWindow* new_root); |
| + ~ScopedRootWindowForNewWindows(); |
| private: |
| - DISALLOW_COPY_AND_ASSIGN(ScopedTargetRootWindow); |
| + WmWindow* old_root_; |
|
James Cook
2016/08/02 00:27:50
I did this initially with base::AutoReset<> but th
msw
2016/08/02 01:04:50
Acknowledged.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ScopedRootWindowForNewWindows); |
| }; |
| } // namespace ash |
| -#endif // ASH_SCOPED_TARGET_ROOT_WINDOW_H_ |
| +#endif // ASH_COMMON_SCOPED_ROOT_WINDOW_FOR_NEW_WINDOWS_H_ |