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

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

Issue 2613793002: Removes/promotes functions from WmWindowMus to WmWindowAura (Closed)
Patch Set: move WmWindowAuraTestApi to ash/test Created 3 years, 11 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/wm_root_window_controller_mus.cc ('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>
(...skipping 14 matching lines...) Expand all
25 25
26 namespace ash { 26 namespace ash {
27 namespace mus { 27 namespace mus {
28 28
29 class AcceleratorControllerDelegateMus; 29 class AcceleratorControllerDelegateMus;
30 class AcceleratorControllerRegistrar; 30 class AcceleratorControllerRegistrar;
31 class ImmersiveHandlerFactoryMus; 31 class ImmersiveHandlerFactoryMus;
32 class WindowManager; 32 class WindowManager;
33 class WmRootWindowControllerMus; 33 class WmRootWindowControllerMus;
34 class WmShellMusTestApi; 34 class WmShellMusTestApi;
35 class WmWindowMus;
36 35
37 // WmShell implementation for mus. 36 // WmShell implementation for mus.
38 class WmShellMus : public WmShell, 37 class WmShellMus : public WmShell,
39 public aura::client::ActivationChangeObserver { 38 public aura::client::ActivationChangeObserver {
40 public: 39 public:
41 WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate, 40 WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate,
42 WindowManager* window_manager, 41 WindowManager* window_manager,
43 views::PointerWatcherEventRouter* pointer_watcher_event_router); 42 views::PointerWatcherEventRouter* pointer_watcher_event_router);
44 ~WmShellMus() override; 43 ~WmShellMus() override;
45 44
46 static WmShellMus* Get(); 45 static WmShellMus* Get();
47 46
48 void AddRootWindowController(WmRootWindowControllerMus* controller); 47 void AddRootWindowController(WmRootWindowControllerMus* controller);
49 void RemoveRootWindowController(WmRootWindowControllerMus* controller); 48 void RemoveRootWindowController(WmRootWindowControllerMus* controller);
50 49
51 // Returns the ancestor of |window| (including |window|) that is considered
52 // toplevel. |window| may be null.
53 static WmWindowMus* GetToplevelAncestor(aura::Window* window);
54
55 WmRootWindowControllerMus* GetRootWindowControllerWithDisplayId(int64_t id); 50 WmRootWindowControllerMus* GetRootWindowControllerWithDisplayId(int64_t id);
56 51
57 AcceleratorControllerDelegateMus* accelerator_controller_delegate() { 52 AcceleratorControllerDelegateMus* accelerator_controller_delegate() {
58 return accelerator_controller_delegate_.get(); 53 return accelerator_controller_delegate_.get();
59 } 54 }
60 55
61 aura::WindowTreeClient* window_tree_client(); 56 aura::WindowTreeClient* window_tree_client();
62 57
63 WindowManager* window_manager() { return window_manager_; } 58 WindowManager* window_manager() { return window_manager_; }
64 59
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void RequestShutdown() override; 111 void RequestShutdown() override;
117 bool IsTouchDown() override; 112 bool IsTouchDown() override;
118 #if defined(OS_CHROMEOS) 113 #if defined(OS_CHROMEOS)
119 void ToggleIgnoreExternalKeyboard() override; 114 void ToggleIgnoreExternalKeyboard() override;
120 void SetLaserPointerEnabled(bool enabled) override; 115 void SetLaserPointerEnabled(bool enabled) override;
121 #endif 116 #endif
122 117
123 private: 118 private:
124 friend class WmShellMusTestApi; 119 friend class WmShellMusTestApi;
125 120
126 // Returns true if |window| is a window that can have active children.
127 static bool IsActivationParent(aura::Window* window);
128
129 // aura::client::ActivationChangeObserver: 121 // aura::client::ActivationChangeObserver:
130 void OnWindowActivated(ActivationReason reason, 122 void OnWindowActivated(ActivationReason reason,
131 aura::Window* gained_active, 123 aura::Window* gained_active,
132 aura::Window* lost_active) override; 124 aura::Window* lost_active) override;
133 125
134 WindowManager* window_manager_; 126 WindowManager* window_manager_;
135 127
136 views::PointerWatcherEventRouter* pointer_watcher_event_router_; 128 views::PointerWatcherEventRouter* pointer_watcher_event_router_;
137 129
138 std::vector<WmRootWindowControllerMus*> root_window_controllers_; 130 std::vector<WmRootWindowControllerMus*> root_window_controllers_;
139 131
140 std::unique_ptr<AcceleratorControllerDelegateMus> 132 std::unique_ptr<AcceleratorControllerDelegateMus>
141 accelerator_controller_delegate_; 133 accelerator_controller_delegate_;
142 std::unique_ptr<AcceleratorControllerRegistrar> 134 std::unique_ptr<AcceleratorControllerRegistrar>
143 accelerator_controller_registrar_; 135 accelerator_controller_registrar_;
144 std::unique_ptr<ImmersiveHandlerFactoryMus> immersive_handler_factory_; 136 std::unique_ptr<ImmersiveHandlerFactoryMus> immersive_handler_factory_;
145 std::unique_ptr<SessionStateDelegate> session_state_delegate_; 137 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
146 138
147 base::ObserverList<WmActivationObserver> activation_observers_; 139 base::ObserverList<WmActivationObserver> activation_observers_;
148 140
149 DISALLOW_COPY_AND_ASSIGN(WmShellMus); 141 DISALLOW_COPY_AND_ASSIGN(WmShellMus);
150 }; 142 };
151 143
152 } // namespace mus 144 } // namespace mus
153 } // namespace ash 145 } // namespace ash
154 146
155 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ 147 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_root_window_controller_mus.cc ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698