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

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

Issue 2318223003: mash: Migrate wallpaper controllers to ash/common. (Closed)
Patch Set: Address comments. 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
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 68 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 virtual base::SequencedWorkerPool* GetBlockingPool() = 0;
365
355 #if defined(OS_CHROMEOS) 366 #if defined(OS_CHROMEOS)
356 LogoutConfirmationController* logout_confirmation_controller() { 367 LogoutConfirmationController* logout_confirmation_controller() {
357 return logout_confirmation_controller_.get(); 368 return logout_confirmation_controller_.get();
358 } 369 }
359 370
360 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved. 371 // TODO(jamescook): Remove this when VirtualKeyboardController has been moved.
361 virtual void ToggleIgnoreExternalKeyboard() = 0; 372 virtual void ToggleIgnoreExternalKeyboard() = 0;
362 #endif 373 #endif
363 374
364 protected: 375 protected:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 std::unique_ptr<MediaDelegate> media_delegate_; 424 std::unique_ptr<MediaDelegate> media_delegate_;
414 std::unique_ptr<MruWindowTracker> mru_window_tracker_; 425 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
415 std::unique_ptr<NewWindowDelegate> new_window_delegate_; 426 std::unique_ptr<NewWindowDelegate> new_window_delegate_;
416 std::unique_ptr<PaletteDelegate> palette_delegate_; 427 std::unique_ptr<PaletteDelegate> palette_delegate_;
417 std::unique_ptr<ShelfDelegate> shelf_delegate_; 428 std::unique_ptr<ShelfDelegate> shelf_delegate_;
418 std::unique_ptr<ShelfModel> shelf_model_; 429 std::unique_ptr<ShelfModel> shelf_model_;
419 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; 430 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
420 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 431 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
421 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; 432 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
422 std::unique_ptr<ToastManager> toast_manager_; 433 std::unique_ptr<ToastManager> toast_manager_;
434 std::unique_ptr<WallpaperController> wallpaper_controller_;
423 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; 435 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
424 std::unique_ptr<WindowCycleController> window_cycle_controller_; 436 std::unique_ptr<WindowCycleController> window_cycle_controller_;
425 std::unique_ptr<WindowSelectorController> window_selector_controller_; 437 std::unique_ptr<WindowSelectorController> window_selector_controller_;
426 438
427 base::ObserverList<LockStateObserver> lock_state_observers_; 439 base::ObserverList<LockStateObserver> lock_state_observers_;
428 440
429 // See comment for GetRootWindowForNewWindows(). 441 // See comment for GetRootWindowForNewWindows().
430 WmWindow* root_window_for_new_windows_ = nullptr; 442 WmWindow* root_window_for_new_windows_ = nullptr;
431 WmWindow* scoped_root_window_for_new_windows_ = nullptr; 443 WmWindow* scoped_root_window_for_new_windows_ = nullptr;
432 444
433 bool simulate_modal_window_open_for_testing_ = false; 445 bool simulate_modal_window_open_for_testing_ = false;
434 446
435 #if defined(OS_CHROMEOS) 447 #if defined(OS_CHROMEOS)
436 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 448 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
437 #endif 449 #endif
438 }; 450 };
439 451
440 } // namespace ash 452 } // namespace ash
441 453
442 #endif // ASH_COMMON_WM_SHELL_H_ 454 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698