diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 22:10:14 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 22:10:14 +0000 |
commit | a857dbe9dab3f8df2b452d8fac0e2f1795ac8926 (patch) | |
tree | 3417cecbbab60f2ad69f05c1157eb8a7bcd9192f /ash/shell.h | |
parent | 800c8d730fc85e7bf9b548947f5842828346c485 (diff) | |
download | chromium_src-a857dbe9dab3f8df2b452d8fac0e2f1795ac8926.zip chromium_src-a857dbe9dab3f8df2b452d8fac0e2f1795ac8926.tar.gz chromium_src-a857dbe9dab3f8df2b452d8fac0e2f1795ac8926.tar.bz2 |
Decouple FocusManager from RootWindow.
- Added FocusChangeObserver
Store active window in ActivationController instead of in RootWindow as there will be multiple root windows.
BUG=123160
TEST=no functional change. all tests must pass.
Review URL: https://chromiumcodereview.appspot.com/10453019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.h')
-rw-r--r-- | ash/shell.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ash/shell.h b/ash/shell.h index 12e7c15..e212335 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -25,6 +25,7 @@ class SkBitmap; namespace aura { class EventFilter; +class FocusManager; class Monitor; class RootWindow; class Window; @@ -133,10 +134,20 @@ class ASH_EXPORT Shell { static void DeleteInstance(); - // Gets the primary RootWindow. The primary RootWindow is the root window + // Gets the primary RootWindow. The primary RootWindow is the one // that has a launcher. static aura::RootWindow* GetPrimaryRootWindow(); + // Gets the active RootWindow. The active RootWindow is the one that + // contains the current active window as a decendant child. The active + // RootWindow remains the same even when the active window becomes NULL, + // until the another window who has a different root window becomes active. + static aura::RootWindow* GetActiveRootWindow(); + + void set_active_root_window(aura::RootWindow* active_root_window) { + active_root_window_ = active_root_window; + } + internal::RootWindowLayoutManager* root_window_layout() const { return root_window_layout_; } @@ -294,6 +305,9 @@ class ASH_EXPORT Shell { browser_context_ = browser_context; } + // Initialize the root window to be used for a secondary monitor. + void InitRootWindowForSecondaryMonitor(aura::RootWindow* root); + private: FRIEND_TEST_ALL_PREFIXES(RootWindowEventFilterTest, MouseEventCursors); FRIEND_TEST_ALL_PREFIXES(RootWindowEventFilterTest, TransformActivate); @@ -320,6 +334,9 @@ class ASH_EXPORT Shell { scoped_ptr<aura::RootWindow> root_window_; ScreenAsh* screen_; + // Active root window. Never become NULL. + aura::RootWindow* active_root_window_; + aura::shared::RootWindowEventFilter* root_filter_; // not owned std::vector<WindowAndBoundsPair> to_restore_; @@ -358,6 +375,7 @@ class ASH_EXPORT Shell { scoped_ptr<HighContrastController> high_contrast_controller_; scoped_ptr<internal::MagnificationController> magnification_controller_; scoped_ptr<internal::ScreenDimmer> screen_dimmer_; + scoped_ptr<aura::FocusManager> focus_manager_; // An event filter that rewrites or drops a key event. scoped_ptr<internal::KeyRewriterEventFilter> key_rewriter_filter_; |