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

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

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests 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
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 ASH_MUS_BRIDGE_WM_GLOBALS_MUS_H_
6 #define ASH_MUS_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 ash {
22 namespace mus {
23
24 class WmRootWindowControllerMus;
25 class WmWindowMus;
26
27 // WmGlobals implementation for mus.
28 class WmGlobalsMus : public 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 wm::WmWindow* NewContainerWindow() override;
47 wm::WmWindow* GetFocusedWindow() override;
48 wm::WmWindow* GetActiveWindow() override;
49 wm::WmWindow* GetPrimaryRootWindow() override;
50 wm::WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
51 wm::WmWindow* GetRootWindowForNewWindows() override;
52 std::vector<wm::WmWindow*> GetMruWindowList() override;
53 std::vector<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<wm::WmWindow*> GetAllRootWindows() override;
60 void RecordUserMetricsAction(wm::WmUserMetricsAction action) override;
61 std::unique_ptr<WindowResizer> CreateDragWindowResizer(
62 std::unique_ptr<WindowResizer> next_window_resizer,
63 wm::WindowState* window_state) override;
64 bool IsOverviewModeSelecting() override;
65 bool IsOverviewModeRestoringMinimizedWindows() override;
66 void AddActivationObserver(wm::WmActivationObserver* observer) override;
67 void RemoveActivationObserver(wm::WmActivationObserver* observer) override;
68 void AddDisplayObserver(wm::WmDisplayObserver* observer) override;
69 void RemoveDisplayObserver(wm::WmDisplayObserver* observer) override;
70 void AddOverviewModeObserver(wm::WmOverviewModeObserver* observer) override;
71 void RemoveOverviewModeObserver(
72 wm::WmOverviewModeObserver* observer) override;
73
74 private:
75 // Returns true if |window| is a window that can have active children.
76 static bool IsActivationParent(::mus::Window* window);
77
78 void RemoveClientObserver();
79
80 // ::mus::WindowTreeClientObserver:
81 void OnWindowTreeFocusChanged(::mus::Window* gained_focus,
82 ::mus::Window* lost_focus) override;
83 void OnWillDestroyClient(::mus::WindowTreeClient* client) override;
84
85 ::mus::WindowTreeClient* client_;
86
87 std::vector<WmRootWindowControllerMus*> root_window_controllers_;
88
89 base::ObserverList<wm::WmActivationObserver> activation_observers_;
90
91 DISALLOW_COPY_AND_ASSIGN(WmGlobalsMus);
92 };
93
94 } // namespace mus
95 } // namespace ash
96
97 #endif // ASH_MUS_BRIDGE_WM_GLOBALS_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698