Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: ash/mus/bridge/wm_globals_mus.h

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/bridge/mus_layout_manager_adapter.cc ('k') | ash/mus/bridge/wm_globals_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_GLOBALS_MUS_H_ 5 #ifndef ASH_MUS_BRIDGE_WM_GLOBALS_MUS_H_
6 #define MASH_WM_BRIDGE_WM_GLOBALS_MUS_H_ 6 #define ASH_MUS_BRIDGE_WM_GLOBALS_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/common/wm/wm_globals.h" 12 #include "ash/common/wm/wm_globals.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "components/mus/public/cpp/window_tree_client_observer.h" 15 #include "components/mus/public/cpp/window_tree_client_observer.h"
16 16
17 namespace mus { 17 namespace mus {
18 class WindowTreeClient; 18 class WindowTreeClient;
19 } 19 }
20 20
21 namespace mash { 21 namespace ash {
22 namespace wm { 22 namespace mus {
23 23
24 class WmRootWindowControllerMus; 24 class WmRootWindowControllerMus;
25 class WmWindowMus; 25 class WmWindowMus;
26 26
27 // WmGlobals implementation for mus. 27 // WmGlobals implementation for mus.
28 class WmGlobalsMus : public ash::wm::WmGlobals, 28 class WmGlobalsMus : public wm::WmGlobals,
29 public mus::WindowTreeClientObserver { 29 public ::mus::WindowTreeClientObserver {
30 public: 30 public:
31 explicit WmGlobalsMus(mus::WindowTreeClient* client); 31 explicit WmGlobalsMus(::mus::WindowTreeClient* client);
32 ~WmGlobalsMus() override; 32 ~WmGlobalsMus() override;
33 33
34 static WmGlobalsMus* Get(); 34 static WmGlobalsMus* Get();
35 35
36 void AddRootWindowController(WmRootWindowControllerMus* controller); 36 void AddRootWindowController(WmRootWindowControllerMus* controller);
37 void RemoveRootWindowController(WmRootWindowControllerMus* controller); 37 void RemoveRootWindowController(WmRootWindowControllerMus* controller);
38 38
39 // Returns the ancestor of |window| (including |window|) that is considered 39 // Returns the ancestor of |window| (including |window|) that is considered
40 // toplevel. |window| may be null. 40 // toplevel. |window| may be null.
41 static WmWindowMus* GetToplevelAncestor(mus::Window* window); 41 static WmWindowMus* GetToplevelAncestor(::mus::Window* window);
42 42
43 WmRootWindowControllerMus* GetRootWindowControllerWithDisplayId(int64_t id); 43 WmRootWindowControllerMus* GetRootWindowControllerWithDisplayId(int64_t id);
44 44
45 // WmGlobals: 45 // WmGlobals:
46 ash::wm::WmWindow* NewContainerWindow() override; 46 wm::WmWindow* NewContainerWindow() override;
47 ash::wm::WmWindow* GetFocusedWindow() override; 47 wm::WmWindow* GetFocusedWindow() override;
48 ash::wm::WmWindow* GetActiveWindow() override; 48 wm::WmWindow* GetActiveWindow() override;
49 ash::wm::WmWindow* GetPrimaryRootWindow() override; 49 wm::WmWindow* GetPrimaryRootWindow() override;
50 ash::wm::WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; 50 wm::WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
51 ash::wm::WmWindow* GetRootWindowForNewWindows() override; 51 wm::WmWindow* GetRootWindowForNewWindows() override;
52 std::vector<ash::wm::WmWindow*> GetMruWindowList() override; 52 std::vector<wm::WmWindow*> GetMruWindowList() override;
53 std::vector<ash::wm::WmWindow*> GetMruWindowListIgnoreModals() override; 53 std::vector<wm::WmWindow*> GetMruWindowListIgnoreModals() override;
54 bool IsForceMaximizeOnFirstRun() override; 54 bool IsForceMaximizeOnFirstRun() override;
55 bool IsUserSessionBlocked() override; 55 bool IsUserSessionBlocked() override;
56 bool IsScreenLocked() override; 56 bool IsScreenLocked() override;
57 void LockCursor() override; 57 void LockCursor() override;
58 void UnlockCursor() override; 58 void UnlockCursor() override;
59 std::vector<ash::wm::WmWindow*> GetAllRootWindows() override; 59 std::vector<wm::WmWindow*> GetAllRootWindows() override;
60 void RecordUserMetricsAction(ash::wm::WmUserMetricsAction action) override; 60 void RecordUserMetricsAction(wm::WmUserMetricsAction action) override;
61 std::unique_ptr<ash::WindowResizer> CreateDragWindowResizer( 61 std::unique_ptr<WindowResizer> CreateDragWindowResizer(
62 std::unique_ptr<ash::WindowResizer> next_window_resizer, 62 std::unique_ptr<WindowResizer> next_window_resizer,
63 ash::wm::WindowState* window_state) override; 63 wm::WindowState* window_state) override;
64 bool IsOverviewModeSelecting() override; 64 bool IsOverviewModeSelecting() override;
65 bool IsOverviewModeRestoringMinimizedWindows() override; 65 bool IsOverviewModeRestoringMinimizedWindows() override;
66 void AddActivationObserver(ash::wm::WmActivationObserver* observer) override; 66 void AddActivationObserver(wm::WmActivationObserver* observer) override;
67 void RemoveActivationObserver( 67 void RemoveActivationObserver(wm::WmActivationObserver* observer) override;
68 ash::wm::WmActivationObserver* observer) override; 68 void AddDisplayObserver(wm::WmDisplayObserver* observer) override;
69 void AddDisplayObserver(ash::wm::WmDisplayObserver* observer) override; 69 void RemoveDisplayObserver(wm::WmDisplayObserver* observer) override;
70 void RemoveDisplayObserver(ash::wm::WmDisplayObserver* observer) override; 70 void AddOverviewModeObserver(wm::WmOverviewModeObserver* observer) override;
71 void AddOverviewModeObserver(
72 ash::wm::WmOverviewModeObserver* observer) override;
73 void RemoveOverviewModeObserver( 71 void RemoveOverviewModeObserver(
74 ash::wm::WmOverviewModeObserver* observer) override; 72 wm::WmOverviewModeObserver* observer) override;
75 73
76 private: 74 private:
77 // Returns true if |window| is a window that can have active children. 75 // Returns true if |window| is a window that can have active children.
78 static bool IsActivationParent(mus::Window* window); 76 static bool IsActivationParent(::mus::Window* window);
79 77
80 void RemoveClientObserver(); 78 void RemoveClientObserver();
81 79
82 // mus::WindowTreeClientObserver: 80 // ::mus::WindowTreeClientObserver:
83 void OnWindowTreeFocusChanged(mus::Window* gained_focus, 81 void OnWindowTreeFocusChanged(::mus::Window* gained_focus,
84 mus::Window* lost_focus) override; 82 ::mus::Window* lost_focus) override;
85 void OnWillDestroyClient(mus::WindowTreeClient* client) override; 83 void OnWillDestroyClient(::mus::WindowTreeClient* client) override;
86 84
87 mus::WindowTreeClient* client_; 85 ::mus::WindowTreeClient* client_;
88 86
89 std::vector<WmRootWindowControllerMus*> root_window_controllers_; 87 std::vector<WmRootWindowControllerMus*> root_window_controllers_;
90 88
91 base::ObserverList<ash::wm::WmActivationObserver> activation_observers_; 89 base::ObserverList<wm::WmActivationObserver> activation_observers_;
92 90
93 DISALLOW_COPY_AND_ASSIGN(WmGlobalsMus); 91 DISALLOW_COPY_AND_ASSIGN(WmGlobalsMus);
94 }; 92 };
95 93
96 } // namespace wm 94 } // namespace mus
97 } // namespace mash 95 } // namespace ash
98 96
99 #endif // MASH_WM_BRIDGE_WM_GLOBALS_MUS_H_ 97 #endif // ASH_MUS_BRIDGE_WM_GLOBALS_MUS_H_
OLDNEW
« no previous file with comments | « ash/mus/bridge/mus_layout_manager_adapter.cc ('k') | ash/mus/bridge/wm_globals_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698