OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 5 #ifndef ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
6 #define ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 6 #define ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/common/wm/wm_root_window_controller.h" | 9 #include "ash/common/wm_root_window_controller.h" |
10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class Window; | 15 class Window; |
16 } | 16 } |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 | 19 |
20 class RootWindowController; | 20 class RootWindowController; |
21 | 21 |
22 namespace wm { | |
23 | |
24 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, | 22 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, |
25 public ShellObserver { | 23 public ShellObserver { |
26 public: | 24 public: |
27 explicit WmRootWindowControllerAura( | 25 explicit WmRootWindowControllerAura( |
28 RootWindowController* root_window_controller); | 26 RootWindowController* root_window_controller); |
29 ~WmRootWindowControllerAura() override; | 27 ~WmRootWindowControllerAura() override; |
30 | 28 |
31 static WmRootWindowControllerAura* Get(aura::Window* window) { | 29 static WmRootWindowControllerAura* Get(aura::Window* window) { |
32 return const_cast<WmRootWindowControllerAura*>( | 30 return const_cast<WmRootWindowControllerAura*>( |
33 Get(const_cast<const aura::Window*>(window))); | 31 Get(const_cast<const aura::Window*>(window))); |
34 } | 32 } |
35 static const WmRootWindowControllerAura* Get(const aura::Window* window); | 33 static const WmRootWindowControllerAura* Get(const aura::Window* window); |
36 | 34 |
37 // WmRootWindowController: | 35 // WmRootWindowController: |
38 bool HasShelf() override; | 36 bool HasShelf() override; |
39 WmGlobals* GetGlobals() override; | 37 WmShell* GetShell() override; |
40 WorkspaceWindowState GetWorkspaceWindowState() override; | 38 wm::WorkspaceWindowState GetWorkspaceWindowState() override; |
41 AlwaysOnTopController* GetAlwaysOnTopController() override; | 39 AlwaysOnTopController* GetAlwaysOnTopController() override; |
42 WmShelf* GetShelf() override; | 40 wm::WmShelf* GetShelf() override; |
James Cook
2016/06/03 20:10:46
My patch to move the shelf code is going to collid
| |
43 WmWindow* GetWindow() override; | 41 WmWindow* GetWindow() override; |
44 void ConfigureWidgetInitParamsForContainer( | 42 void ConfigureWidgetInitParamsForContainer( |
45 views::Widget* widget, | 43 views::Widget* widget, |
46 int shell_container_id, | 44 int shell_container_id, |
47 views::Widget::InitParams* init_params) override; | 45 views::Widget::InitParams* init_params) override; |
48 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; | 46 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; |
49 void AddObserver(WmRootWindowControllerObserver* observer) override; | 47 void AddObserver(WmRootWindowControllerObserver* observer) override; |
50 void RemoveObserver(WmRootWindowControllerObserver* observer) override; | 48 void RemoveObserver(WmRootWindowControllerObserver* observer) override; |
51 | 49 |
52 // ShellObserver: | 50 // ShellObserver: |
53 void OnDisplayWorkAreaInsetsChanged() override; | 51 void OnDisplayWorkAreaInsetsChanged() override; |
54 void OnFullscreenStateChanged(bool is_fullscreen, | 52 void OnFullscreenStateChanged(bool is_fullscreen, |
55 aura::Window* root_window) override; | 53 aura::Window* root_window) override; |
56 void OnShelfAlignmentChanged(aura::Window* root_window) override; | 54 void OnShelfAlignmentChanged(aura::Window* root_window) override; |
57 | 55 |
58 private: | 56 private: |
59 RootWindowController* root_window_controller_; | 57 RootWindowController* root_window_controller_; |
60 base::ObserverList<WmRootWindowControllerObserver> observers_; | 58 base::ObserverList<WmRootWindowControllerObserver> observers_; |
61 | 59 |
62 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); | 60 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); |
63 }; | 61 }; |
64 | 62 |
65 } // namespace wm | |
66 } // namespace ash | 63 } // namespace ash |
67 | 64 |
68 #endif // ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 65 #endif // ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
OLD | NEW |