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

Side by Side Diff: mash/wm/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 | « mash/wm/bridge/mus_layout_manager_adapter.cc ('k') | mash/wm/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MASH_WM_BRIDGE_WM_GLOBALS_MUS_H_
6 #define MASH_WM_BRIDGE_WM_GLOBALS_MUS_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 #include "ash/common/wm/wm_globals.h"
13 #include "base/macros.h"
14 #include "base/observer_list.h"
15 #include "components/mus/public/cpp/window_tree_client_observer.h"
16
17 namespace mus {
18 class WindowTreeClient;
19 }
20
21 namespace mash {
22 namespace wm {
23
24 class WmRootWindowControllerMus;
25 class WmWindowMus;
26
27 // WmGlobals implementation for mus.
28 class WmGlobalsMus : public ash::wm::WmGlobals,
29 public mus::WindowTreeClientObserver {
30 public:
31 explicit WmGlobalsMus(mus::WindowTreeClient* client);
32 ~WmGlobalsMus() override;
33
34 static WmGlobalsMus* Get();
35
36 void AddRootWindowController(WmRootWindowControllerMus* controller);
37 void RemoveRootWindowController(WmRootWindowControllerMus* controller);
38
39 // Returns the ancestor of |window| (including |window|) that is considered
40 // toplevel. |window| may be null.
41 static WmWindowMus* GetToplevelAncestor(mus::Window* window);
42
43 WmRootWindowControllerMus* GetRootWindowControllerWithDisplayId(int64_t id);
44
45 // WmGlobals:
46 ash::wm::WmWindow* NewContainerWindow() override;
47 ash::wm::WmWindow* GetFocusedWindow() override;
48 ash::wm::WmWindow* GetActiveWindow() override;
49 ash::wm::WmWindow* GetPrimaryRootWindow() override;
50 ash::wm::WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
51 ash::wm::WmWindow* GetRootWindowForNewWindows() override;
52 std::vector<ash::wm::WmWindow*> GetMruWindowList() override;
53 std::vector<ash::wm::WmWindow*> GetMruWindowListIgnoreModals() override;
54 bool IsForceMaximizeOnFirstRun() override;
55 bool IsUserSessionBlocked() override;
56 bool IsScreenLocked() override;
57 void LockCursor() override;
58 void UnlockCursor() override;
59 std::vector<ash::wm::WmWindow*> GetAllRootWindows() override;
60 void RecordUserMetricsAction(ash::wm::WmUserMetricsAction action) override;
61 std::unique_ptr<ash::WindowResizer> CreateDragWindowResizer(
62 std::unique_ptr<ash::WindowResizer> next_window_resizer,
63 ash::wm::WindowState* window_state) override;
64 bool IsOverviewModeSelecting() override;
65 bool IsOverviewModeRestoringMinimizedWindows() override;
66 void AddActivationObserver(ash::wm::WmActivationObserver* observer) override;
67 void RemoveActivationObserver(
68 ash::wm::WmActivationObserver* observer) override;
69 void AddDisplayObserver(ash::wm::WmDisplayObserver* observer) override;
70 void RemoveDisplayObserver(ash::wm::WmDisplayObserver* observer) override;
71 void AddOverviewModeObserver(
72 ash::wm::WmOverviewModeObserver* observer) override;
73 void RemoveOverviewModeObserver(
74 ash::wm::WmOverviewModeObserver* observer) override;
75
76 private:
77 // Returns true if |window| is a window that can have active children.
78 static bool IsActivationParent(mus::Window* window);
79
80 void RemoveClientObserver();
81
82 // mus::WindowTreeClientObserver:
83 void OnWindowTreeFocusChanged(mus::Window* gained_focus,
84 mus::Window* lost_focus) override;
85 void OnWillDestroyClient(mus::WindowTreeClient* client) override;
86
87 mus::WindowTreeClient* client_;
88
89 std::vector<WmRootWindowControllerMus*> root_window_controllers_;
90
91 base::ObserverList<ash::wm::WmActivationObserver> activation_observers_;
92
93 DISALLOW_COPY_AND_ASSIGN(WmGlobalsMus);
94 };
95
96 } // namespace wm
97 } // namespace mash
98
99 #endif // MASH_WM_BRIDGE_WM_GLOBALS_MUS_H_
OLDNEW
« no previous file with comments | « mash/wm/bridge/mus_layout_manager_adapter.cc ('k') | mash/wm/bridge/wm_globals_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698