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

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

Issue 2235363003: Wires up WmShellMus::Add/RemovePointerWatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pointer_watcher_capture
Patch Set: merge to tot again Created 4 years, 4 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/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_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 ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ 5 #ifndef ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ 6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "services/ui/public/cpp/window_tree_client_observer.h" 16 #include "services/ui/public/cpp/window_tree_client_observer.h"
17 17
18 namespace shell { 18 namespace shell {
19 class Connector; 19 class Connector;
20 } 20 }
21 21
22 namespace ui { 22 namespace ui {
23 class WindowTreeClient; 23 class WindowTreeClient;
24 } 24 }
25 25
26 namespace views {
27 class PointerWatcherEventRouter;
28 }
29
26 namespace ash { 30 namespace ash {
27 namespace mus { 31 namespace mus {
28 32
29 class AcceleratorControllerDelegateMus; 33 class AcceleratorControllerDelegateMus;
30 class AcceleratorControllerRegistrar; 34 class AcceleratorControllerRegistrar;
31 class WindowManager; 35 class WindowManager;
32 class WmRootWindowControllerMus; 36 class WmRootWindowControllerMus;
33 class WmShellMusTestApi; 37 class WmShellMusTestApi;
34 class WmWindowMus; 38 class WmWindowMus;
35 39
36 // WmShell implementation for mus. 40 // WmShell implementation for mus.
37 class WmShellMus : public WmShell, public ui::WindowTreeClientObserver { 41 class WmShellMus : public WmShell, public ui::WindowTreeClientObserver {
38 public: 42 public:
39 WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate, 43 WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate,
40 WindowManager* window_manager); 44 WindowManager* window_manager,
45 views::PointerWatcherEventRouter* pointer_watcher_event_router);
41 ~WmShellMus() override; 46 ~WmShellMus() override;
42 47
43 static WmShellMus* Get(); 48 static WmShellMus* Get();
44 49
45 void AddRootWindowController(WmRootWindowControllerMus* controller); 50 void AddRootWindowController(WmRootWindowControllerMus* controller);
46 void RemoveRootWindowController(WmRootWindowControllerMus* controller); 51 void RemoveRootWindowController(WmRootWindowControllerMus* controller);
47 52
48 // Returns the ancestor of |window| (including |window|) that is considered 53 // Returns the ancestor of |window| (including |window|) that is considered
49 // toplevel. |window| may be null. 54 // toplevel. |window| may be null.
50 static WmWindowMus* GetToplevelAncestor(ui::Window* window); 55 static WmWindowMus* GetToplevelAncestor(ui::Window* window);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 CreateScopedDisableInternalMouseAndKeyboard() override; 95 CreateScopedDisableInternalMouseAndKeyboard() override;
91 std::unique_ptr<WmImmersiveFullscreenController> 96 std::unique_ptr<WmImmersiveFullscreenController>
92 CreateImmersiveFullscreenController() override; 97 CreateImmersiveFullscreenController() override;
93 void OnOverviewModeStarting() override; 98 void OnOverviewModeStarting() override;
94 void OnOverviewModeEnded() override; 99 void OnOverviewModeEnded() override;
95 SessionStateDelegate* GetSessionStateDelegate() override; 100 SessionStateDelegate* GetSessionStateDelegate() override;
96 void AddActivationObserver(WmActivationObserver* observer) override; 101 void AddActivationObserver(WmActivationObserver* observer) override;
97 void RemoveActivationObserver(WmActivationObserver* observer) override; 102 void RemoveActivationObserver(WmActivationObserver* observer) override;
98 void AddDisplayObserver(WmDisplayObserver* observer) override; 103 void AddDisplayObserver(WmDisplayObserver* observer) override;
99 void RemoveDisplayObserver(WmDisplayObserver* observer) override; 104 void RemoveDisplayObserver(WmDisplayObserver* observer) override;
100 void AddPointerWatcher(views::PointerWatcher* watcher) override; 105 void AddPointerWatcher(views::PointerWatcher* watcher,
106 bool wants_moves) override;
101 void RemovePointerWatcher(views::PointerWatcher* watcher) override; 107 void RemovePointerWatcher(views::PointerWatcher* watcher) override;
102 bool IsTouchDown() override; 108 bool IsTouchDown() override;
103 #if defined(OS_CHROMEOS) 109 #if defined(OS_CHROMEOS)
104 void ToggleIgnoreExternalKeyboard() override; 110 void ToggleIgnoreExternalKeyboard() override;
105 #endif 111 #endif
106 112
107 private: 113 private:
108 friend class WmShellMusTestApi; 114 friend class WmShellMusTestApi;
109 115
110 ui::WindowTreeClient* window_tree_client(); 116 ui::WindowTreeClient* window_tree_client();
111 117
112 // Returns true if |window| is a window that can have active children. 118 // Returns true if |window| is a window that can have active children.
113 static bool IsActivationParent(ui::Window* window); 119 static bool IsActivationParent(ui::Window* window);
114 120
115 // ui::WindowTreeClientObserver: 121 // ui::WindowTreeClientObserver:
116 void OnWindowTreeFocusChanged(ui::Window* gained_focus, 122 void OnWindowTreeFocusChanged(ui::Window* gained_focus,
117 ui::Window* lost_focus) override; 123 ui::Window* lost_focus) override;
118 void OnDidDestroyClient(ui::WindowTreeClient* client) override; 124 void OnDidDestroyClient(ui::WindowTreeClient* client) override;
119 125
120 WindowManager* window_manager_; 126 WindowManager* window_manager_;
121 127
128 views::PointerWatcherEventRouter* pointer_watcher_event_router_;
129
122 std::vector<WmRootWindowControllerMus*> root_window_controllers_; 130 std::vector<WmRootWindowControllerMus*> root_window_controllers_;
123 131
124 std::unique_ptr<AcceleratorControllerDelegateMus> 132 std::unique_ptr<AcceleratorControllerDelegateMus>
125 accelerator_controller_delegate_; 133 accelerator_controller_delegate_;
126 std::unique_ptr<AcceleratorControllerRegistrar> 134 std::unique_ptr<AcceleratorControllerRegistrar>
127 accelerator_controller_registrar_; 135 accelerator_controller_registrar_;
128 std::unique_ptr<SessionStateDelegate> session_state_delegate_; 136 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
129 137
130 base::ObserverList<WmActivationObserver> activation_observers_; 138 base::ObserverList<WmActivationObserver> activation_observers_;
131 139
132 DISALLOW_COPY_AND_ASSIGN(WmShellMus); 140 DISALLOW_COPY_AND_ASSIGN(WmShellMus);
133 }; 141 };
134 142
135 } // namespace mus 143 } // namespace mus
136 } // namespace ash 144 } // namespace ash
137 145
138 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ 146 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698