| 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_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
| 6 #define ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 6 #define ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shell_observer.h" |
| 9 #include "ash/wm/common/wm_root_window_controller.h" | 10 #include "ash/wm/common/wm_root_window_controller.h" |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/observer_list.h" |
| 11 | 13 |
| 12 namespace aura { | 14 namespace aura { |
| 13 class Window; | 15 class Window; |
| 14 } | 16 } |
| 15 | 17 |
| 16 namespace ash { | 18 namespace ash { |
| 17 | 19 |
| 18 class RootWindowController; | 20 class RootWindowController; |
| 19 | 21 |
| 20 namespace wm { | 22 namespace wm { |
| 21 | 23 |
| 22 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController { | 24 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, |
| 25 public ShellObserver { |
| 23 public: | 26 public: |
| 24 explicit WmRootWindowControllerAura( | 27 explicit WmRootWindowControllerAura( |
| 25 RootWindowController* root_window_controller); | 28 RootWindowController* root_window_controller); |
| 26 ~WmRootWindowControllerAura() override; | 29 ~WmRootWindowControllerAura() override; |
| 27 | 30 |
| 28 static WmRootWindowControllerAura* Get(aura::Window* window) { | 31 static WmRootWindowControllerAura* Get(aura::Window* window) { |
| 29 return const_cast<WmRootWindowControllerAura*>( | 32 return const_cast<WmRootWindowControllerAura*>( |
| 30 Get(const_cast<const aura::Window*>(window))); | 33 Get(const_cast<const aura::Window*>(window))); |
| 31 } | 34 } |
| 32 static const WmRootWindowControllerAura* Get(const aura::Window* window); | 35 static const WmRootWindowControllerAura* Get(const aura::Window* window); |
| 33 | 36 |
| 34 // WmRootWindowController: | 37 // WmRootWindowController: |
| 35 bool HasShelf() override; | 38 bool HasShelf() override; |
| 36 WmGlobals* GetGlobals() override; | 39 WmGlobals* GetGlobals() override; |
| 37 WorkspaceWindowState GetWorkspaceWindowState() override; | 40 WorkspaceWindowState GetWorkspaceWindowState() override; |
| 38 WmWindow* GetWindow() override; | 41 WmWindow* GetWindow() override; |
| 39 void ConfigureWidgetInitParamsForContainer( | 42 void ConfigureWidgetInitParamsForContainer( |
| 40 views::Widget* widget, | 43 views::Widget* widget, |
| 41 int shell_container_id, | 44 int shell_container_id, |
| 42 views::Widget::InitParams* init_params) override; | 45 views::Widget::InitParams* init_params) override; |
| 46 void AddObserver(WmRootWindowControllerObserver* observer) override; |
| 47 void RemoveObserver(WmRootWindowControllerObserver* observer) override; |
| 48 |
| 49 // ShellObserver: |
| 50 void OnDisplayWorkAreaInsetsChanged() override; |
| 51 void OnFullscreenStateChanged(bool is_fullscreen, |
| 52 aura::Window* root_window) override; |
| 53 void OnShelfAlignmentChanged(aura::Window* root_window) override; |
| 43 | 54 |
| 44 private: | 55 private: |
| 45 RootWindowController* root_window_controller_; | 56 RootWindowController* root_window_controller_; |
| 57 base::ObserverList<WmRootWindowControllerObserver> observers_; |
| 46 | 58 |
| 47 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); | 59 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); |
| 48 }; | 60 }; |
| 49 | 61 |
| 50 } // namespace wm | 62 } // namespace wm |
| 51 } // namespace ash | 63 } // namespace ash |
| 52 | 64 |
| 53 #endif // ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 65 #endif // ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
| OLD | NEW |