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

Side by Side Diff: ash/common/wm_shell.h

Issue 2766543002: Move even more from WmShell to Shell (Closed)
Patch Set: Created 3 years, 9 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/window_positioner.cc ('k') | ash/common/wm_shell.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_COMMON_WM_SHELL_H_ 5 #ifndef ASH_COMMON_WM_SHELL_H_
6 #define ASH_COMMON_WM_SHELL_H_ 6 #define ASH_COMMON_WM_SHELL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 20 matching lines...) Expand all
31 class Point; 31 class Point;
32 } 32 }
33 33
34 namespace views { 34 namespace views {
35 class PointerWatcher; 35 class PointerWatcher;
36 enum class PointerWatcherEventTypes; 36 enum class PointerWatcherEventTypes;
37 } 37 }
38 38
39 namespace ash { 39 namespace ash {
40 class AcceleratorController; 40 class AcceleratorController;
41 class ImmersiveContextAsh;
42 class ImmersiveFullscreenController; 41 class ImmersiveFullscreenController;
43 class KeyEventWatcher; 42 class KeyEventWatcher;
44 class KeyboardUI; 43 class KeyboardUI;
45 class MaximizeModeController;
46 class MediaController;
47 class MruWindowTracker;
48 class NewWindowController;
49 class RootWindowController; 44 class RootWindowController;
50 class ScopedDisableInternalMouseAndKeyboard; 45 class ScopedDisableInternalMouseAndKeyboard;
51 class SessionController; 46 class SessionController;
52 class SessionStateDelegate; 47 class SessionStateDelegate;
53 class ShelfController; 48 class ShelfController;
54 class ShelfDelegate; 49 class ShelfDelegate;
55 class ShelfModel; 50 class ShelfModel;
56 class ShelfWindowWatcher; 51 class ShelfWindowWatcher;
57 struct ShellInitParams; 52 struct ShellInitParams;
58 class ShutdownController; 53 class ShutdownController;
(...skipping 18 matching lines...) Expand all
77 // Similar to ash::Shell. Eventually the two will be merged. 72 // Similar to ash::Shell. Eventually the two will be merged.
78 class ASH_EXPORT WmShell : public SessionStateObserver { 73 class ASH_EXPORT WmShell : public SessionStateObserver {
79 public: 74 public:
80 ~WmShell() override; 75 ~WmShell() override;
81 76
82 static WmShell* Get(); 77 static WmShell* Get();
83 static bool HasInstance() { return instance_ != nullptr; } 78 static bool HasInstance() { return instance_ != nullptr; }
84 79
85 virtual void Shutdown(); 80 virtual void Shutdown();
86 81
87 MaximizeModeController* maximize_mode_controller() {
88 return maximize_mode_controller_.get();
89 }
90
91 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
92
93 MediaController* media_controller() { return media_controller_.get(); }
94
95 NewWindowController* new_window_controller() {
96 return new_window_controller_.get();
97 }
98
99 SessionController* session_controller() { return session_controller_.get(); } 82 SessionController* session_controller() { return session_controller_.get(); }
100 83
101 ShelfController* shelf_controller() { return shelf_controller_.get(); } 84 ShelfController* shelf_controller() { return shelf_controller_.get(); }
102 85
103 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); } 86 ShelfDelegate* shelf_delegate() { return shelf_delegate_.get(); }
104 87
105 ShelfModel* shelf_model(); 88 ShelfModel* shelf_model();
106 89
107 ShutdownController* shutdown_controller() { 90 ShutdownController* shutdown_controller() {
108 return shutdown_controller_.get(); 91 return shutdown_controller_.get();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 virtual void InitHosts(const ShellInitParams& init_params) = 0; 278 virtual void InitHosts(const ShellInitParams& init_params) = 0;
296 279
297 // Called during startup to create the AcceleratorController. 280 // Called during startup to create the AcceleratorController.
298 virtual std::unique_ptr<AcceleratorController> 281 virtual std::unique_ptr<AcceleratorController>
299 CreateAcceleratorController() = 0; 282 CreateAcceleratorController() = 0;
300 283
301 void DeleteWindowCycleController(); 284 void DeleteWindowCycleController();
302 285
303 void DeleteWindowSelectorController(); 286 void DeleteWindowSelectorController();
304 287
305 void CreateMaximizeModeController();
306 void DeleteMaximizeModeController();
307
308 void CreateMruWindowTracker();
309 void DeleteMruWindowTracker();
310
311 // SessionStateObserver: 288 // SessionStateObserver:
312 void SessionStateChanged(session_manager::SessionState state) override; 289 void SessionStateChanged(session_manager::SessionState state) override;
313 290
314 private: 291 private:
315 friend class AcceleratorControllerTest; 292 friend class AcceleratorControllerTest;
316 friend class Shell; 293 friend class Shell;
317 294
318 static WmShell* instance_; 295 static WmShell* instance_;
319 296
320 std::unique_ptr<ImmersiveContextAsh> immersive_context_;
321 std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
322 std::unique_ptr<MediaController> media_controller_;
323 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
324 std::unique_ptr<NewWindowController> new_window_controller_;
325 std::unique_ptr<SessionController> session_controller_; 297 std::unique_ptr<SessionController> session_controller_;
326 std::unique_ptr<ShelfController> shelf_controller_; 298 std::unique_ptr<ShelfController> shelf_controller_;
327 std::unique_ptr<ShelfDelegate> shelf_delegate_; 299 std::unique_ptr<ShelfDelegate> shelf_delegate_;
328 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; 300 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
329 std::unique_ptr<ShutdownController> shutdown_controller_; 301 std::unique_ptr<ShutdownController> shutdown_controller_;
330 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 302 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
331 std::unique_ptr<VpnList> vpn_list_; 303 std::unique_ptr<VpnList> vpn_list_;
332 std::unique_ptr<WindowCycleController> window_cycle_controller_; 304 std::unique_ptr<WindowCycleController> window_cycle_controller_;
333 std::unique_ptr<WindowSelectorController> window_selector_controller_; 305 std::unique_ptr<WindowSelectorController> window_selector_controller_;
334 306
335 base::ObserverList<LockStateObserver> lock_state_observers_; 307 base::ObserverList<LockStateObserver> lock_state_observers_;
336 308
337 bool simulate_modal_window_open_for_testing_ = false; 309 bool simulate_modal_window_open_for_testing_ = false;
338 }; 310 };
339 311
340 } // namespace ash 312 } // namespace ash
341 313
342 #endif // ASH_COMMON_WM_SHELL_H_ 314 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW
« no previous file with comments | « ash/common/wm/window_positioner.cc ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698