| 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" | |
| 10 #include "ash/common/wm_root_window_controller.h" | 9 #include "ash/common/wm_root_window_controller.h" |
| 11 #include "base/macros.h" | 10 #include "base/macros.h" |
| 12 #include "ui/display/display_observer.h" | |
| 13 | 11 |
| 14 namespace aura { | 12 namespace aura { |
| 15 class Window; | 13 class Window; |
| 16 } | 14 } |
| 17 | 15 |
| 18 namespace ash { | 16 namespace ash { |
| 19 | 17 |
| 20 class RootWindowController; | 18 class RootWindowController; |
| 21 | 19 |
| 22 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, | 20 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController { |
| 23 public ShellObserver, | |
| 24 public display::DisplayObserver { | |
| 25 public: | 21 public: |
| 26 explicit WmRootWindowControllerAura( | 22 explicit WmRootWindowControllerAura( |
| 27 RootWindowController* root_window_controller); | 23 RootWindowController* root_window_controller); |
| 28 ~WmRootWindowControllerAura() override; | 24 ~WmRootWindowControllerAura() override; |
| 29 | 25 |
| 30 static WmRootWindowControllerAura* Get(aura::Window* window) { | 26 static WmRootWindowControllerAura* Get(aura::Window* window) { |
| 31 return const_cast<WmRootWindowControllerAura*>( | 27 return const_cast<WmRootWindowControllerAura*>( |
| 32 Get(const_cast<const aura::Window*>(window))); | 28 Get(const_cast<const aura::Window*>(window))); |
| 33 } | 29 } |
| 34 static const WmRootWindowControllerAura* Get(const aura::Window* window); | 30 static const WmRootWindowControllerAura* Get(const aura::Window* window); |
| 35 | 31 |
| 36 // WmRootWindowController: | 32 // WmRootWindowController: |
| 37 bool HasShelf() override; | 33 bool HasShelf() override; |
| 38 WmShell* GetShell() override; | 34 WmShell* GetShell() override; |
| 39 AlwaysOnTopController* GetAlwaysOnTopController() override; | 35 AlwaysOnTopController* GetAlwaysOnTopController() override; |
| 40 WmShelf* GetShelf() override; | 36 WmShelf* GetShelf() override; |
| 41 WmWindow* GetWindow() override; | 37 WmWindow* GetWindow() override; |
| 42 void ConfigureWidgetInitParamsForContainer( | 38 void ConfigureWidgetInitParamsForContainer( |
| 43 views::Widget* widget, | 39 views::Widget* widget, |
| 44 int shell_container_id, | 40 int shell_container_id, |
| 45 views::Widget::InitParams* init_params) override; | 41 views::Widget::InitParams* init_params) override; |
| 46 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; | 42 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; |
| 47 gfx::Point GetLastMouseLocationInRoot() override; | 43 gfx::Point GetLastMouseLocationInRoot() override; |
| 48 | 44 |
| 49 // ShellObserver: | |
| 50 void OnShelfAlignmentChanged(WmWindow* root_window) override; | |
| 51 | |
| 52 // DisplayObserver: | |
| 53 void OnDisplayAdded(const display::Display& display) override; | |
| 54 void OnDisplayRemoved(const display::Display& display) override; | |
| 55 void OnDisplayMetricsChanged(const display::Display& display, | |
| 56 uint32_t metrics) override; | |
| 57 | |
| 58 private: | 45 private: |
| 59 friend class RootWindowController; | 46 friend class RootWindowController; |
| 60 | 47 |
| 61 RootWindowController* root_window_controller_; | 48 RootWindowController* root_window_controller_; |
| 62 | 49 |
| 63 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); | 50 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); |
| 64 }; | 51 }; |
| 65 | 52 |
| 66 } // namespace ash | 53 } // namespace ash |
| 67 | 54 |
| 68 #endif // ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ | 55 #endif // ASH_AURA_WM_ROOT_CONTROLLER_AURA_H_ |
| OLD | NEW |