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

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

Issue 2144363003: Create ash media delegate earlier during ash shell initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shelldelegates
Patch Set: rebase 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 | « no previous file | 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Similar to ash::Shell. Eventually the two will be merged. 53 // Similar to ash::Shell. Eventually the two will be merged.
54 class ASH_EXPORT WmShell { 54 class ASH_EXPORT WmShell {
55 public: 55 public:
56 // This is necessary for a handful of places that is difficult to plumb 56 // This is necessary for a handful of places that is difficult to plumb
57 // through context. 57 // through context.
58 static void Set(WmShell* instance); 58 static void Set(WmShell* instance);
59 static WmShell* Get(); 59 static WmShell* Get();
60 static bool HasInstance() { return instance_ != nullptr; } 60 static bool HasInstance() { return instance_ != nullptr; }
61 61
62 void Initialize();
63
62 ShellDelegate* delegate() { return delegate_.get(); } 64 ShellDelegate* delegate() { return delegate_.get(); }
63 65
64 BrightnessControlDelegate* brightness_control_delegate() { 66 BrightnessControlDelegate* brightness_control_delegate() {
65 return brightness_control_delegate_.get(); 67 return brightness_control_delegate_.get();
66 } 68 }
67 69
68 FocusCycler* focus_cycler() { return focus_cycler_.get(); } 70 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
69 71
70 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() { 72 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
71 return keyboard_brightness_control_delegate_.get(); 73 return keyboard_brightness_control_delegate_.get();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 virtual ~WmShell(); 224 virtual ~WmShell();
223 225
224 base::ObserverList<ShellObserver>* shell_observers() { 226 base::ObserverList<ShellObserver>* shell_observers() {
225 return &shell_observers_; 227 return &shell_observers_;
226 } 228 }
227 229
228 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); 230 void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui);
229 231
230 // Helpers to set (and initialize) or destroy various delegates. 232 // Helpers to set (and initialize) or destroy various delegates.
231 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported. 233 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported.
232 void SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate);
233 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); 234 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
234 void DeleteSystemTrayDelegate(); 235 void DeleteSystemTrayDelegate();
235 236
236 void DeleteWindowSelectorController(); 237 void DeleteWindowSelectorController();
237 238
238 void CreateMaximizeModeController(); 239 void CreateMaximizeModeController();
239 void DeleteMaximizeModeController(); 240 void DeleteMaximizeModeController();
240 241
241 void CreateMruWindowTracker(); 242 void CreateMruWindowTracker();
242 void DeleteMruWindowTracker(); 243 void DeleteMruWindowTracker();
(...skipping 22 matching lines...) Expand all
265 bool simulate_modal_window_open_for_testing_ = false; 266 bool simulate_modal_window_open_for_testing_ = false;
266 267
267 #if defined(OS_CHROMEOS) 268 #if defined(OS_CHROMEOS)
268 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 269 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
269 #endif 270 #endif
270 }; 271 };
271 272
272 } // namespace ash 273 } // namespace ash
273 274
274 #endif // ASH_COMMON_WM_SHELL_H_ 275 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698