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

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

Issue 2434463004: mash: Move directly linked NewWindowDelegate to mojom::NewWindowClient. (Closed)
Patch Set: Actually rename the browser test. Created 4 years, 2 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>
(...skipping 22 matching lines...) Expand all
33 class Insets; 33 class Insets;
34 class Point; 34 class Point;
35 } 35 }
36 36
37 namespace views { 37 namespace views {
38 class PointerWatcher; 38 class PointerWatcher;
39 enum class PointerWatcherEventTypes; 39 enum class PointerWatcherEventTypes;
40 } 40 }
41 41
42 namespace ash { 42 namespace ash {
43
44 class AcceleratorController; 43 class AcceleratorController;
45 class AccessibilityDelegate; 44 class AccessibilityDelegate;
46 class BrightnessControlDelegate; 45 class BrightnessControlDelegate;
47 class FocusCycler; 46 class FocusCycler;
48 class ImmersiveContextAsh; 47 class ImmersiveContextAsh;
49 class ImmersiveFullscreenController; 48 class ImmersiveFullscreenController;
50 class KeyEventWatcher; 49 class KeyEventWatcher;
51 class KeyboardBrightnessControlDelegate; 50 class KeyboardBrightnessControlDelegate;
52 class KeyboardUI; 51 class KeyboardUI;
53 class LocaleNotificationController; 52 class LocaleNotificationController;
54 class MaximizeModeController; 53 class MaximizeModeController;
55 class MruWindowTracker; 54 class MruWindowTracker;
56 class NewWindowDelegate;
57 class PaletteDelegate; 55 class PaletteDelegate;
58 class ScopedDisableInternalMouseAndKeyboard; 56 class ScopedDisableInternalMouseAndKeyboard;
59 class SessionStateDelegate; 57 class SessionStateDelegate;
60 class ShelfController; 58 class ShelfController;
61 class ShelfDelegate; 59 class ShelfDelegate;
62 class ShelfModel; 60 class ShelfModel;
63 class ShelfWindowWatcher; 61 class ShelfWindowWatcher;
64 class ShellDelegate; 62 class ShellDelegate;
65 class ShellObserver; 63 class ShellObserver;
66 class SystemTrayDelegate; 64 class SystemTrayDelegate;
67 class SystemTrayController; 65 class SystemTrayController;
68 class SystemTrayNotifier; 66 class SystemTrayNotifier;
69 class ToastManager; 67 class ToastManager;
70 class WallpaperController; 68 class WallpaperController;
71 class WallpaperDelegate; 69 class WallpaperDelegate;
72 class WindowCycleController; 70 class WindowCycleController;
73 class WindowCycleEventFilter; 71 class WindowCycleEventFilter;
74 class WindowResizer; 72 class WindowResizer;
75 class WindowSelectorController; 73 class WindowSelectorController;
76 class WmActivationObserver; 74 class WmActivationObserver;
77 class WmDisplayObserver; 75 class WmDisplayObserver;
78 class WmRootWindowController; 76 class WmRootWindowController;
79 class WmWindow; 77 class WmWindow;
80 class WorkspaceEventHandler; 78 class WorkspaceEventHandler;
81 79
82 enum class LoginStatus; 80 enum class LoginStatus;
83 enum class TaskSwitchSource; 81 enum class TaskSwitchSource;
84 82
83 namespace mojom {
84 class NewWindowClient;
85 }
86
85 namespace wm { 87 namespace wm {
86 class MaximizeModeEventHandler; 88 class MaximizeModeEventHandler;
87 class WindowState; 89 class WindowState;
88 } 90 }
89 91
90 #if defined(OS_CHROMEOS) 92 #if defined(OS_CHROMEOS)
91 class LogoutConfirmationController; 93 class LogoutConfirmationController;
92 #endif 94 #endif
93 95
94 // Similar to ash::Shell. Eventually the two will be merged. 96 // Similar to ash::Shell. Eventually the two will be merged.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 132 }
131 133
132 MaximizeModeController* maximize_mode_controller() { 134 MaximizeModeController* maximize_mode_controller() {
133 return maximize_mode_controller_.get(); 135 return maximize_mode_controller_.get();
134 } 136 }
135 137
136 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } 138 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); }
137 139
138 MediaDelegate* media_delegate() { return media_delegate_.get(); } 140 MediaDelegate* media_delegate() { return media_delegate_.get(); }
139 141
140 NewWindowDelegate* new_window_delegate() { 142 mojom::NewWindowClient* new_window_client() {
141 return new_window_delegate_.get(); 143 return new_window_client_.get();
142 } 144 }
143 145
144 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily. 146 // NOTE: Prefer ScopedRootWindowForNewWindows when setting temporarily.
145 void set_root_window_for_new_windows(WmWindow* root) { 147 void set_root_window_for_new_windows(WmWindow* root) {
146 root_window_for_new_windows_ = root; 148 root_window_for_new_windows_ = root;
147 } 149 }
148 150
149 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } 151 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); }
150 152
151 ShelfController* shelf_controller() { return shelf_controller_.get(); } 153 ShelfController* shelf_controller() { return shelf_controller_.get(); }
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 455
454 void SetAcceleratorController( 456 void SetAcceleratorController(
455 std::unique_ptr<AcceleratorController> accelerator_controller); 457 std::unique_ptr<AcceleratorController> accelerator_controller);
456 458
457 private: 459 private:
458 friend class AcceleratorControllerTest; 460 friend class AcceleratorControllerTest;
459 friend class ScopedRootWindowForNewWindows; 461 friend class ScopedRootWindowForNewWindows;
460 friend class Shell; 462 friend class Shell;
461 friend class WmShellTestApi; 463 friend class WmShellTestApi;
462 464
465 // Used in testing to replace the delegate with a local mock.
466 void SetNewWindowClient(
James Cook 2016/10/21 22:22:30 or rename this ForTesting?
Elliot Glaysher 2016/10/21 22:45:56 (Deleted).
467 std::unique_ptr<mojom::NewWindowClient> new_window_client);
468
463 static WmShell* instance_; 469 static WmShell* instance_;
464 470
465 base::ObserverList<ShellObserver> shell_observers_; 471 base::ObserverList<ShellObserver> shell_observers_;
466 std::unique_ptr<ShellDelegate> delegate_; 472 std::unique_ptr<ShellDelegate> delegate_;
467 473
468 std::unique_ptr<AcceleratorController> accelerator_controller_; 474 std::unique_ptr<AcceleratorController> accelerator_controller_;
469 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; 475 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
470 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_; 476 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
471 std::unique_ptr<FocusCycler> focus_cycler_; 477 std::unique_ptr<FocusCycler> focus_cycler_;
472 std::unique_ptr<ImmersiveContextAsh> immersive_context_; 478 std::unique_ptr<ImmersiveContextAsh> immersive_context_;
473 std::unique_ptr<KeyboardBrightnessControlDelegate> 479 std::unique_ptr<KeyboardBrightnessControlDelegate>
474 keyboard_brightness_control_delegate_; 480 keyboard_brightness_control_delegate_;
475 std::unique_ptr<KeyboardUI> keyboard_ui_; 481 std::unique_ptr<KeyboardUI> keyboard_ui_;
476 std::unique_ptr<LocaleNotificationController> locale_notification_controller_; 482 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
477 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; 483 std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
478 std::unique_ptr<MediaDelegate> media_delegate_; 484 std::unique_ptr<MediaDelegate> media_delegate_;
479 std::unique_ptr<MruWindowTracker> mru_window_tracker_; 485 std::unique_ptr<MruWindowTracker> mru_window_tracker_;
480 std::unique_ptr<NewWindowDelegate> new_window_delegate_; 486 std::unique_ptr<mojom::NewWindowClient> new_window_client_;
481 std::unique_ptr<PaletteDelegate> palette_delegate_; 487 std::unique_ptr<PaletteDelegate> palette_delegate_;
482 std::unique_ptr<ShelfController> shelf_controller_; 488 std::unique_ptr<ShelfController> shelf_controller_;
483 std::unique_ptr<ShelfDelegate> shelf_delegate_; 489 std::unique_ptr<ShelfDelegate> shelf_delegate_;
484 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; 490 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_;
485 std::unique_ptr<SystemTrayController> system_tray_controller_; 491 std::unique_ptr<SystemTrayController> system_tray_controller_;
486 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; 492 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_;
487 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; 493 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
488 std::unique_ptr<ToastManager> toast_manager_; 494 std::unique_ptr<ToastManager> toast_manager_;
489 std::unique_ptr<WallpaperController> wallpaper_controller_; 495 std::unique_ptr<WallpaperController> wallpaper_controller_;
490 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; 496 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
(...skipping 11 matching lines...) Expand all
502 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; 508 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
503 509
504 #if defined(OS_CHROMEOS) 510 #if defined(OS_CHROMEOS)
505 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; 511 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
506 #endif 512 #endif
507 }; 513 };
508 514
509 } // namespace ash 515 } // namespace ash
510 516
511 #endif // ASH_COMMON_WM_SHELL_H_ 517 #endif // ASH_COMMON_WM_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698