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

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

Issue 2113053003: Moves Shell::maximize_mode_controller() to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 5 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/app_list/app_list_presenter_delegate.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 11 matching lines...) Expand all
22 namespace views { 22 namespace views {
23 class PointerWatcher; 23 class PointerWatcher;
24 } 24 }
25 25
26 namespace ash { 26 namespace ash {
27 27
28 class AccessibilityDelegate; 28 class AccessibilityDelegate;
29 class DisplayInfo; 29 class DisplayInfo;
30 class FocusCycler; 30 class FocusCycler;
31 class KeyboardUI; 31 class KeyboardUI;
32 class MaximizeModeController;
32 class MruWindowTracker; 33 class MruWindowTracker;
33 class ScopedDisableInternalMouseAndKeyboard; 34 class ScopedDisableInternalMouseAndKeyboard;
34 class SessionStateDelegate; 35 class SessionStateDelegate;
35 class ShellObserver; 36 class ShellObserver;
36 class SystemTrayDelegate; 37 class SystemTrayDelegate;
37 class SystemTrayNotifier; 38 class SystemTrayNotifier;
38 class WindowResizer; 39 class WindowResizer;
39 class WindowSelectorController; 40 class WindowSelectorController;
40 class WmActivationObserver; 41 class WmActivationObserver;
41 class WmDisplayObserver; 42 class WmDisplayObserver;
(...skipping 15 matching lines...) Expand all
57 // This is necessary for a handful of places that is difficult to plumb 58 // This is necessary for a handful of places that is difficult to plumb
58 // through context. 59 // through context.
59 static void Set(WmShell* instance); 60 static void Set(WmShell* instance);
60 static WmShell* Get(); 61 static WmShell* Get();
61 static bool HasInstance() { return instance_ != nullptr; } 62 static bool HasInstance() { return instance_ != nullptr; }
62 63
63 FocusCycler* focus_cycler() { return focus_cycler_.get(); } 64 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
64 65
65 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); } 66 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
66 67
68 MaximizeModeController* maximize_mode_controller() {
69 return maximize_mode_controller_.get();
70 }
71
67 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } 72 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
68 73
69 MediaDelegate* media_delegate() { return media_delegate_.get(); } 74 MediaDelegate* media_delegate() { return media_delegate_.get(); }
70 75
71 SystemTrayNotifier* system_tray_notifier() { 76 SystemTrayNotifier* system_tray_notifier() {
72 return system_tray_notifier_.get(); 77 return system_tray_notifier_.get();
73 } 78 }
74 79
75 SystemTrayDelegate* system_tray_delegate() { 80 SystemTrayDelegate* system_tray_delegate() {
76 return system_tray_delegate_.get(); 81 return system_tray_delegate_.get();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); 217 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui);
213 218
214 // Helpers to set (and initialize) or destroy various delegates. 219 // Helpers to set (and initialize) or destroy various delegates.
215 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. 220 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported.
216 void SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate); 221 void SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate);
217 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); 222 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
218 void DeleteSystemTrayDelegate(); 223 void DeleteSystemTrayDelegate();
219 224
220 void DeleteWindowSelectorController(); 225 void DeleteWindowSelectorController();
221 226
227 void CreateMaximizeModeController();
228 void DeleteMaximizeModeController();
229
222 void CreateMruWindowTracker(); 230 void CreateMruWindowTracker();
223 void DeleteMruWindowTracker(); 231 void DeleteMruWindowTracker();
224 232
225 private: 233 private:
226 friend class Shell; 234 friend class Shell;
227 235
228 static WmShell* instance_; 236 static WmShell* instance_;
229 237
230 base::ObserverList<ShellObserver> shell_observers_; 238 base::ObserverList<ShellObserver> shell_observers_;
231 239
232 std::unique_ptr<FocusCycler> focus_cycler_; 240 std::unique_ptr<FocusCycler> focus_cycler_;
233 std::unique_ptr<KeyboardUI> keyboard_ui_; 241 std::unique_ptr<KeyboardUI> keyboard_ui_;
242 std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
234 std::unique_ptr<MediaDelegate> media_delegate_; 243 std::unique_ptr<MediaDelegate> media_delegate_;
235 std::unique_ptr<MruWindowTracker> mru_window_tracker_; 244 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
236 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 245 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
237 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; 246 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
238 std::unique_ptr<WindowSelectorController> window_selector_controller_; 247 std::unique_ptr<WindowSelectorController> window_selector_controller_;
239 248
240 bool simulate_modal_window_open_for_testing_ = false; 249 bool simulate_modal_window_open_for_testing_ = false;
241 250
242 #if defined(OS_CHROMEOS) 251 #if defined(OS_CHROMEOS)
243 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 252 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
244 #endif 253 #endif
245 }; 254 };
246 255
247 } // namespace ash 256 } // namespace ash
248 257
249 #endif // ASH_COMMON_WM_SHELL_H_ 258 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698