| 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_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 5 #ifndef ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
| 6 #define ASH_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/shell_observer.h" | 9 #include "ash/common/shell_observer.h" |
| 10 #include "ash/common/wm_root_window_controller.h" | 10 #include "ash/common/wm_root_window_controller.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "ui/display/display_observer.h" |
| 13 | 14 |
| 14 namespace aura { | 15 namespace aura { |
| 15 class Window; | 16 class Window; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace ash { | 19 namespace ash { |
| 19 | 20 |
| 20 class RootWindowController; | 21 class RootWindowController; |
| 21 | 22 |
| 22 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, | 23 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, |
| 23 public ShellObserver { | 24 public ShellObserver, |
| 25 public display::DisplayObserver { |
| 24 public: | 26 public: |
| 25 explicit WmRootWindowControllerAura( | 27 explicit WmRootWindowControllerAura( |
| 26 RootWindowController* root_window_controller); | 28 RootWindowController* root_window_controller); |
| 27 ~WmRootWindowControllerAura() override; | 29 ~WmRootWindowControllerAura() override; |
| 28 | 30 |
| 29 static WmRootWindowControllerAura* Get(aura::Window* window) { | 31 static WmRootWindowControllerAura* Get(aura::Window* window) { |
| 30 return const_cast<WmRootWindowControllerAura*>( | 32 return const_cast<WmRootWindowControllerAura*>( |
| 31 Get(const_cast<const aura::Window*>(window))); | 33 Get(const_cast<const aura::Window*>(window))); |
| 32 } | 34 } |
| 33 static const WmRootWindowControllerAura* Get(const aura::Window* window); | 35 static const WmRootWindowControllerAura* Get(const aura::Window* window); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 WmWindow* GetWindow() override; | 46 WmWindow* GetWindow() override; |
| 45 void ConfigureWidgetInitParamsForContainer( | 47 void ConfigureWidgetInitParamsForContainer( |
| 46 views::Widget* widget, | 48 views::Widget* widget, |
| 47 int shell_container_id, | 49 int shell_container_id, |
| 48 views::Widget::InitParams* init_params) override; | 50 views::Widget::InitParams* init_params) override; |
| 49 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; | 51 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; |
| 50 void AddObserver(WmRootWindowControllerObserver* observer) override; | 52 void AddObserver(WmRootWindowControllerObserver* observer) override; |
| 51 void RemoveObserver(WmRootWindowControllerObserver* observer) override; | 53 void RemoveObserver(WmRootWindowControllerObserver* observer) override; |
| 52 | 54 |
| 53 // ShellObserver: | 55 // ShellObserver: |
| 54 void OnDisplayWorkAreaInsetsChanged() override; | |
| 55 void OnFullscreenStateChanged(bool is_fullscreen, | 56 void OnFullscreenStateChanged(bool is_fullscreen, |
| 56 WmWindow* root_window) override; | 57 WmWindow* root_window) override; |
| 57 void OnShelfAlignmentChanged(WmWindow* root_window) override; | 58 void OnShelfAlignmentChanged(WmWindow* root_window) override; |
| 58 | 59 |
| 60 // DisplayObserver: |
| 61 void OnDisplayAdded(const display::Display& display) override; |
| 62 void OnDisplayRemoved(const display::Display& display) override; |
| 63 void OnDisplayMetricsChanged(const display::Display& display, |
| 64 uint32_t metrics) override; |
| 65 |
| 59 private: | 66 private: |
| 60 RootWindowController* root_window_controller_; | 67 RootWindowController* root_window_controller_; |
| 61 base::ObserverList<WmRootWindowControllerObserver> observers_; | 68 base::ObserverList<WmRootWindowControllerObserver> observers_; |
| 62 | 69 |
| 63 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); | 70 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); |
| 64 }; | 71 }; |
| 65 | 72 |
| 66 } // namespace ash | 73 } // namespace ash |
| 67 | 74 |
| 68 #endif // ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 75 #endif // ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
| OLD | NEW |