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 MASH_WM_BRIDGE_WM_ROOT_CONTROLLER_MUS_H_ | 5 #ifndef ASH_MUS_BRIDGE_WM_ROOT_WINDOW_CONTROLLER_MUS_H_ |
6 #define MASH_WM_BRIDGE_WM_ROOT_CONTROLLER_MUS_H_ | 6 #define ASH_MUS_BRIDGE_WM_ROOT_WINDOW_CONTROLLER_MUS_H_ |
7 | 7 |
8 #include "ash/common/wm/wm_root_window_controller.h" | 8 #include "ash/common/wm/wm_root_window_controller.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 | 11 |
12 namespace display { | 12 namespace display { |
13 class Display; | 13 class Display; |
14 } | 14 } |
15 | 15 |
16 namespace mus { | 16 namespace mus { |
17 class Window; | 17 class Window; |
18 } | 18 } |
19 | 19 |
20 namespace mash { | 20 namespace ash { |
21 namespace wm { | 21 namespace mus { |
22 | 22 |
23 class RootWindowController; | 23 class RootWindowController; |
24 class WmGlobalsMus; | 24 class WmGlobalsMus; |
25 class WmWindowMus; | 25 class WmWindowMus; |
26 | 26 |
27 // WmRootWindowController implementations for mus. | 27 // WmRootWindowController implementations for mus. |
28 class WmRootWindowControllerMus : public ash::wm::WmRootWindowController { | 28 class WmRootWindowControllerMus : public wm::WmRootWindowController { |
29 public: | 29 public: |
30 WmRootWindowControllerMus(WmGlobalsMus* globals, | 30 WmRootWindowControllerMus(WmGlobalsMus* globals, |
31 RootWindowController* root_window_controller); | 31 RootWindowController* root_window_controller); |
32 ~WmRootWindowControllerMus() override; | 32 ~WmRootWindowControllerMus() override; |
33 | 33 |
34 static WmRootWindowControllerMus* Get(mus::Window* window) { | 34 static WmRootWindowControllerMus* Get(::mus::Window* window) { |
35 return const_cast<WmRootWindowControllerMus*>( | 35 return const_cast<WmRootWindowControllerMus*>( |
36 Get(const_cast<const mus::Window*>(window))); | 36 Get(const_cast<const ::mus::Window*>(window))); |
37 } | 37 } |
38 static const WmRootWindowControllerMus* Get(const mus::Window* window); | 38 static const WmRootWindowControllerMus* Get(const ::mus::Window* window); |
39 | 39 |
40 RootWindowController* root_window_controller() { | 40 RootWindowController* root_window_controller() { |
41 return root_window_controller_; | 41 return root_window_controller_; |
42 } | 42 } |
43 | 43 |
44 void NotifyFullscreenStateChange(bool is_fullscreen); | 44 void NotifyFullscreenStateChange(bool is_fullscreen); |
45 | 45 |
46 // Screen conversion functions. | 46 // Screen conversion functions. |
47 gfx::Point ConvertPointToScreen(const WmWindowMus* source, | 47 gfx::Point ConvertPointToScreen(const WmWindowMus* source, |
48 const gfx::Point& point) const; | 48 const gfx::Point& point) const; |
49 gfx::Point ConvertPointFromScreen(const WmWindowMus* target, | 49 gfx::Point ConvertPointFromScreen(const WmWindowMus* target, |
50 const gfx::Point& point) const; | 50 const gfx::Point& point) const; |
51 | 51 |
52 const display::Display& GetDisplay() const; | 52 const display::Display& GetDisplay() const; |
53 | 53 |
54 // WmRootWindowController: | 54 // WmRootWindowController: |
55 bool HasShelf() override; | 55 bool HasShelf() override; |
56 ash::wm::WmGlobals* GetGlobals() override; | 56 wm::WmGlobals* GetGlobals() override; |
57 ash::wm::WorkspaceWindowState GetWorkspaceWindowState() override; | 57 wm::WorkspaceWindowState GetWorkspaceWindowState() override; |
58 ash::AlwaysOnTopController* GetAlwaysOnTopController() override; | 58 AlwaysOnTopController* GetAlwaysOnTopController() override; |
59 ash::wm::WmShelf* GetShelf() override; | 59 wm::WmShelf* GetShelf() override; |
60 ash::wm::WmWindow* GetWindow() override; | 60 wm::WmWindow* GetWindow() override; |
61 void ConfigureWidgetInitParamsForContainer( | 61 void ConfigureWidgetInitParamsForContainer( |
62 views::Widget* widget, | 62 views::Widget* widget, |
63 int shell_container_id, | 63 int shell_container_id, |
64 views::Widget::InitParams* init_params) override; | 64 views::Widget::InitParams* init_params) override; |
65 ash::wm::WmWindow* FindEventTarget( | 65 wm::WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; |
66 const gfx::Point& location_in_screen) override; | 66 void AddObserver(wm::WmRootWindowControllerObserver* observer) override; |
67 void AddObserver(ash::wm::WmRootWindowControllerObserver* observer) override; | 67 void RemoveObserver(wm::WmRootWindowControllerObserver* observer) override; |
68 void RemoveObserver( | |
69 ash::wm::WmRootWindowControllerObserver* observer) override; | |
70 | 68 |
71 private: | 69 private: |
72 WmGlobalsMus* globals_; | 70 WmGlobalsMus* globals_; |
73 RootWindowController* root_window_controller_; | 71 RootWindowController* root_window_controller_; |
74 base::ObserverList<ash::wm::WmRootWindowControllerObserver> observers_; | 72 base::ObserverList<wm::WmRootWindowControllerObserver> observers_; |
75 | 73 |
76 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerMus); | 74 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerMus); |
77 }; | 75 }; |
78 | 76 |
79 } // namespace wm | 77 } // namespace mus |
80 } // namespace mash | 78 } // namespace ash |
81 | 79 |
82 #endif // MASH_WM_BRIDGE_WM_ROOT_CONTROLLER_MUS_H_ | 80 #endif // ASH_MUS_BRIDGE_WM_ROOT_WINDOW_CONTROLLER_MUS_H_ |
OLD | NEW |