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

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

Issue 2318223003: mash: Migrate wallpaper controllers to ash/common. (Closed)
Patch Set: Fix nit. Created 4 years, 3 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_root_window_controller.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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/ash_export.h" 13 #include "ash/ash_export.h"
14 #include "ash/common/media_delegate.h" 14 #include "ash/common/media_delegate.h"
15 #include "ash/common/metrics/gesture_action_type.h" 15 #include "ash/common/metrics/gesture_action_type.h"
16 #include "ash/common/metrics/user_metrics_action.h" 16 #include "ash/common/metrics/user_metrics_action.h"
17 #include "ash/common/wm/lock_state_observer.h" 17 #include "ash/common/wm/lock_state_observer.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "ui/base/ui_base_types.h" 19 #include "ui/base/ui_base_types.h"
20 20
21 namespace base {
22 class SequencedWorkerPool;
23 }
24
21 namespace display { 25 namespace display {
22 class Display; 26 class Display;
23 class ManagedDisplayInfo; 27 class ManagedDisplayInfo;
24 } 28 }
25 29
26 namespace gfx { 30 namespace gfx {
27 class Insets; 31 class Insets;
28 class Point; 32 class Point;
29 } 33 }
30 34
(...skipping 19 matching lines...) Expand all
50 class ScopedDisableInternalMouseAndKeyboard; 54 class ScopedDisableInternalMouseAndKeyboard;
51 class SessionStateDelegate; 55 class SessionStateDelegate;
52 class ShelfDelegate; 56 class ShelfDelegate;
53 class ShelfModel; 57 class ShelfModel;
54 class ShelfWindowWatcher; 58 class ShelfWindowWatcher;
55 class ShellDelegate; 59 class ShellDelegate;
56 class ShellObserver; 60 class ShellObserver;
57 class SystemTrayDelegate; 61 class SystemTrayDelegate;
58 class SystemTrayNotifier; 62 class SystemTrayNotifier;
59 class ToastManager; 63 class ToastManager;
64 class WallpaperController;
60 class WallpaperDelegate; 65 class WallpaperDelegate;
61 class WindowCycleController; 66 class WindowCycleController;
62 class WindowCycleEventFilter; 67 class WindowCycleEventFilter;
63 class WindowResizer; 68 class WindowResizer;
64 class WindowSelectorController; 69 class WindowSelectorController;
65 class WmActivationObserver; 70 class WmActivationObserver;
66 class WmDisplayObserver; 71 class WmDisplayObserver;
67 class WmWindow; 72 class WmWindow;
68 class WorkspaceEventHandler; 73 class WorkspaceEventHandler;
69 74
(...skipping 10 matching lines...) Expand all
80 85
81 // Similar to ash::Shell. Eventually the two will be merged. 86 // Similar to ash::Shell. Eventually the two will be merged.
82 class ASH_EXPORT WmShell { 87 class ASH_EXPORT WmShell {
83 public: 88 public:
84 // This is necessary for a handful of places that is difficult to plumb 89 // This is necessary for a handful of places that is difficult to plumb
85 // through context. 90 // through context.
86 static void Set(WmShell* instance); 91 static void Set(WmShell* instance);
87 static WmShell* Get(); 92 static WmShell* Get();
88 static bool HasInstance() { return instance_ != nullptr; } 93 static bool HasInstance() { return instance_ != nullptr; }
89 94
90 void Initialize(); 95 void Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool);
91 virtual void Shutdown(); 96 virtual void Shutdown();
92 97
93 ShellDelegate* delegate() { return delegate_.get(); } 98 ShellDelegate* delegate() { return delegate_.get(); }
94 99
95 AcceleratorController* accelerator_controller() { 100 AcceleratorController* accelerator_controller() {
96 return accelerator_controller_.get(); 101 return accelerator_controller_.get();
97 } 102 }
98 103
99 AccessibilityDelegate* accessibility_delegate() { 104 AccessibilityDelegate* accessibility_delegate() {
100 return accessibility_delegate_.get(); 105 return accessibility_delegate_.get();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 SystemTrayNotifier* system_tray_notifier() { 143 SystemTrayNotifier* system_tray_notifier() {
139 return system_tray_notifier_.get(); 144 return system_tray_notifier_.get();
140 } 145 }
141 146
142 SystemTrayDelegate* system_tray_delegate() { 147 SystemTrayDelegate* system_tray_delegate() {
143 return system_tray_delegate_.get(); 148 return system_tray_delegate_.get();
144 } 149 }
145 150
146 ToastManager* toast_manager() { return toast_manager_.get(); } 151 ToastManager* toast_manager() { return toast_manager_.get(); }
147 152
153 WallpaperController* wallpaper_controller() {
154 return wallpaper_controller_.get();
155 }
156
148 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); } 157 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); }
149 158
150 WindowCycleController* window_cycle_controller() { 159 WindowCycleController* window_cycle_controller() {
151 return window_cycle_controller_.get(); 160 return window_cycle_controller_.get();
152 } 161 }
153 162
154 WindowSelectorController* window_selector_controller() { 163 WindowSelectorController* window_selector_controller() {
155 return window_selector_controller_.get(); 164 return window_selector_controller_.get();
156 } 165 }
157 166
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void AddLockStateObserver(LockStateObserver* observer); 354 void AddLockStateObserver(LockStateObserver* observer);
346 void RemoveLockStateObserver(LockStateObserver* observer); 355 void RemoveLockStateObserver(LockStateObserver* observer);
347 356
348 void SetShelfDelegateForTesting(std::unique_ptr<ShelfDelegate> test_delegate); 357 void SetShelfDelegateForTesting(std::unique_ptr<ShelfDelegate> test_delegate);
349 void SetPaletteDelegateForTesting( 358 void SetPaletteDelegateForTesting(
350 std::unique_ptr<PaletteDelegate> palette_delegate); 359 std::unique_ptr<PaletteDelegate> palette_delegate);
351 360
352 // True if any touch points are down. 361 // True if any touch points are down.
353 virtual bool IsTouchDown() = 0; 362 virtual bool IsTouchDown() = 0;
354 363
364 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool() {
365 return blocking_pool_;
366 }
367
355 #if defined(OS_CHROMEOS) 368 #if defined(OS_CHROMEOS)
356 LogoutConfirmationController* logout_confirmation_controller() { 369 LogoutConfirmationController* logout_confirmation_controller() {
357 return logout_confirmation_controller_.get(); 370 return logout_confirmation_controller_.get();
358 } 371 }
359 372
360 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. 373 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved.
361 virtual void ToggleIgnoreExternalKeyboard() = 0; 374 virtual void ToggleIgnoreExternalKeyboard() = 0;
362 #endif 375 #endif
363 376
364 protected: 377 protected:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 std::unique_ptr<MediaDelegate> media_delegate_; 426 std::unique_ptr<MediaDelegate> media_delegate_;
414 std::unique_ptr<MruWindowTracker> mru_window_tracker_; 427 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
415 std::unique_ptr<NewWindowDelegate> new_window_delegate_; 428 std::unique_ptr<NewWindowDelegate> new_window_delegate_;
416 std::unique_ptr<PaletteDelegate> palette_delegate_; 429 std::unique_ptr<PaletteDelegate> palette_delegate_;
417 std::unique_ptr<ShelfDelegate> shelf_delegate_; 430 std::unique_ptr<ShelfDelegate> shelf_delegate_;
418 std::unique_ptr<ShelfModel> shelf_model_; 431 std::unique_ptr<ShelfModel> shelf_model_;
419 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; 432 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
420 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 433 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
421 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; 434 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
422 std::unique_ptr<ToastManager> toast_manager_; 435 std::unique_ptr<ToastManager> toast_manager_;
436 std::unique_ptr<WallpaperController> wallpaper_controller_;
423 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; 437 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
424 std::unique_ptr<WindowCycleController> window_cycle_controller_; 438 std::unique_ptr<WindowCycleController> window_cycle_controller_;
425 std::unique_ptr<WindowSelectorController> window_selector_controller_; 439 std::unique_ptr<WindowSelectorController> window_selector_controller_;
426 440
427 base::ObserverList<LockStateObserver> lock_state_observers_; 441 base::ObserverList<LockStateObserver> lock_state_observers_;
428 442
429 // See comment for GetRootWindowForNewWindows(). 443 // See comment for GetRootWindowForNewWindows().
430 WmWindow* root_window_for_new_windows_ = nullptr; 444 WmWindow* root_window_for_new_windows_ = nullptr;
431 WmWindow* scoped_root_window_for_new_windows_ = nullptr; 445 WmWindow* scoped_root_window_for_new_windows_ = nullptr;
432 446
433 bool simulate_modal_window_open_for_testing_ = false; 447 bool simulate_modal_window_open_for_testing_ = false;
434 448
449 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
450
435 #if defined(OS_CHROMEOS) 451 #if defined(OS_CHROMEOS)
436 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 452 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
437 #endif 453 #endif
438 }; 454 };
439 455
440 } // namespace ash 456 } // namespace ash
441 457
442 #endif // ASH_COMMON_WM_SHELL_H_ 458 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW
« no previous file with comments | « ash/common/wm_root_window_controller.cc ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698