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

Side by Side Diff: ash/shell.h

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: cleanup Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SHELL_H_ 5 #ifndef ASH_SHELL_H_
6 #define ASH_SHELL_H_ 6 #define ASH_SHELL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 namespace display { 46 namespace display {
47 class DisplayChangeObserver; 47 class DisplayChangeObserver;
48 class DisplayConfigurator; 48 class DisplayConfigurator;
49 class DisplayManager; 49 class DisplayManager;
50 } 50 }
51 51
52 namespace gfx { 52 namespace gfx {
53 class Insets; 53 class Insets;
54 } 54 }
55 55
56 namespace preferences {
57 class PrefClientStore;
58 }
59
56 namespace ui { 60 namespace ui {
57 class UserActivityDetector; 61 class UserActivityDetector;
58 class UserActivityPowerManagerNotifier; 62 class UserActivityPowerManagerNotifier;
59 namespace devtools { 63 namespace devtools {
60 class UiDevToolsServer; 64 class UiDevToolsServer;
61 } 65 }
62 } 66 }
63 67
64 namespace views { 68 namespace views {
65 class NonClientFrameView; 69 class NonClientFrameView;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 class ProjectingObserver; 115 class ProjectingObserver;
112 class ResizeShadowController; 116 class ResizeShadowController;
113 class ResolutionNotificationController; 117 class ResolutionNotificationController;
114 class RootWindowController; 118 class RootWindowController;
115 class ScopedOverviewAnimationSettingsFactoryAura; 119 class ScopedOverviewAnimationSettingsFactoryAura;
116 class ScreenOrientationController; 120 class ScreenOrientationController;
117 class ScreenshotController; 121 class ScreenshotController;
118 class ScreenPinningController; 122 class ScreenPinningController;
119 class ScreenPositionController; 123 class ScreenPositionController;
120 class SessionStateDelegate; 124 class SessionStateDelegate;
125 class ShellDelegate;
121 struct ShellInitParams; 126 struct ShellInitParams;
122 class ShellObserver; 127 class ShellObserver;
123 class ShutdownObserver; 128 class ShutdownObserver;
124 class SmsObserver; 129 class SmsObserver;
125 class StickyKeysController; 130 class StickyKeysController;
126 class SystemGestureEventFilter; 131 class SystemGestureEventFilter;
127 class SystemModalContainerEventFilter; 132 class SystemModalContainerEventFilter;
128 class SystemTray; 133 class SystemTray;
129 class ToplevelWindowEventHandler; 134 class ToplevelWindowEventHandler;
130 class ScreenLayoutObserver; 135 class ScreenLayoutObserver;
131 class ToastManager; 136 class ToastManager;
132 class VirtualKeyboardController; 137 class VirtualKeyboardController;
133 class VideoActivityNotifier; 138 class VideoActivityNotifier;
134 class VideoDetector; 139 class VideoDetector;
135 class WallpaperController; 140 class WallpaperController;
141 class WallpaperDelegate;
136 class WebNotificationTray; 142 class WebNotificationTray;
137 class WindowPositioner; 143 class WindowPositioner;
138 class WindowTreeHostManager; 144 class WindowTreeHostManager;
139 class WmShell; 145 class WmShell;
140 class WmWindow; 146 class WmWindow;
141 147
142 namespace shell { 148 namespace shell {
143 class WindowWatcher; 149 class WindowWatcher;
144 } 150 }
145 151
(...skipping 12 matching lines...) Expand all
158 public aura::client::ActivationChangeObserver { 164 public aura::client::ActivationChangeObserver {
159 public: 165 public:
160 typedef std::vector<RootWindowController*> RootWindowControllerList; 166 typedef std::vector<RootWindowController*> RootWindowControllerList;
161 167
162 // A shell must be explicitly created so that it can call |Init()| with the 168 // A shell must be explicitly created so that it can call |Init()| with the
163 // delegate set. |delegate| can be NULL (if not required for initialization). 169 // delegate set. |delegate| can be NULL (if not required for initialization).
164 // Takes ownership of |delegate|. 170 // Takes ownership of |delegate|.
165 static Shell* CreateInstance(const ShellInitParams& init_params); 171 static Shell* CreateInstance(const ShellInitParams& init_params);
166 172
167 // Should never be called before |CreateInstance()|. 173 // Should never be called before |CreateInstance()|.
168 static Shell* GetInstance(); 174 // TODO: deprecated. Use Get() instead. GetInstance() will be renamed close
175 // to branch point.
176 static Shell* GetInstance() { return Get(); }
177 static Shell* Get();
169 178
170 // Returns true if the ash shell has been instantiated. 179 // Returns true if the ash shell has been instantiated.
171 static bool HasInstance(); 180 static bool HasInstance();
172 181
173 static void DeleteInstance(); 182 static void DeleteInstance();
174 183
175 // Returns the root window controller for the primary root window. 184 // Returns the root window controller for the primary root window.
176 // TODO(oshima): move this to |RootWindowController| 185 // TODO(oshima): move this to |RootWindowController|
177 static RootWindowController* GetPrimaryRootWindowController(); 186 static RootWindowController* GetPrimaryRootWindowController();
178 187
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 void set_link_handler_model_factory( 293 void set_link_handler_model_factory(
285 LinkHandlerModelFactory* link_handler_model_factory) { 294 LinkHandlerModelFactory* link_handler_model_factory) {
286 link_handler_model_factory_ = link_handler_model_factory; 295 link_handler_model_factory_ = link_handler_model_factory;
287 } 296 }
288 PowerButtonController* power_button_controller() { 297 PowerButtonController* power_button_controller() {
289 return power_button_controller_.get(); 298 return power_button_controller_.get();
290 } 299 }
291 LockStateController* lock_state_controller() { 300 LockStateController* lock_state_controller() {
292 return lock_state_controller_.get(); 301 return lock_state_controller_.get();
293 } 302 }
303 preferences::PrefClientStore* pref_store() { return pref_store_.get(); }
294 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } 304 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); }
305 ShellDelegate* delegate() { return delegate_.get(); }
James Cook 2017/03/11 00:40:43 optional: Since you're moving it, and there are al
sky 2017/03/13 15:23:19 Done.
295 VideoDetector* video_detector() { return video_detector_.get(); } 306 VideoDetector* video_detector() { return video_detector_.get(); }
296 WallpaperController* wallpaper_controller() { 307 WallpaperController* wallpaper_controller() {
297 return wallpaper_controller_.get(); 308 return wallpaper_controller_.get();
298 } 309 }
310 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); }
299 WindowTreeHostManager* window_tree_host_manager() { 311 WindowTreeHostManager* window_tree_host_manager() {
300 return window_tree_host_manager_.get(); 312 return window_tree_host_manager_.get();
301 } 313 }
302 PowerEventObserver* power_event_observer() { 314 PowerEventObserver* power_event_observer() {
303 return power_event_observer_.get(); 315 return power_event_observer_.get();
304 } 316 }
305 AshTouchTransformController* touch_transformer_controller() { 317 AshTouchTransformController* touch_transformer_controller() {
306 return touch_transformer_controller_.get(); 318 return touch_transformer_controller_.get();
307 } 319 }
308 LaserPointerController* laser_pointer_controller() { 320 LaserPointerController* laser_pointer_controller() {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 private: 492 private:
481 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); 493 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
482 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); 494 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
483 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); 495 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
484 friend class RootWindowController; 496 friend class RootWindowController;
485 friend class ScopedRootWindowForNewWindows; 497 friend class ScopedRootWindowForNewWindows;
486 friend class SmsObserverTest; 498 friend class SmsObserverTest;
487 friend class test::ShellTestApi; 499 friend class test::ShellTestApi;
488 friend class shell::WindowWatcher; 500 friend class shell::WindowWatcher;
489 501
490 explicit Shell(std::unique_ptr<WmShell> wm_shell); 502 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
503 std::unique_ptr<WmShell> wm_shell);
491 ~Shell() override; 504 ~Shell() override;
492 505
493 void Init(const ShellInitParams& init_params); 506 void Init(const ShellInitParams& init_params);
494 507
495 // Initializes virtual keyboard controller. 508 // Initializes virtual keyboard controller.
496 void InitKeyboard(); 509 void InitKeyboard();
497 510
498 // Initializes the root window so that it can host browser windows. 511 // Initializes the root window so that it can host browser windows.
499 void InitRootWindow(aura::Window* root_window); 512 void InitRootWindow(aura::Window* root_window);
500 513
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; 548 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
536 std::unique_ptr<AcceleratorControllerDelegateAura> 549 std::unique_ptr<AcceleratorControllerDelegateAura>
537 accelerator_controller_delegate_; 550 accelerator_controller_delegate_;
538 std::unique_ptr<SessionStateDelegate> session_state_delegate_; 551 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
539 std::unique_ptr<WindowPositioner> window_positioner_; 552 std::unique_ptr<WindowPositioner> window_positioner_;
540 553
541 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; 554 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
542 std::unique_ptr<PaletteDelegate> palette_delegate_; 555 std::unique_ptr<PaletteDelegate> palette_delegate_;
543 std::unique_ptr<DragDropController> drag_drop_controller_; 556 std::unique_ptr<DragDropController> drag_drop_controller_;
544 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; 557 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
558 std::unique_ptr<ShellDelegate> delegate_;
545 std::unique_ptr<ToastManager> toast_manager_; 559 std::unique_ptr<ToastManager> toast_manager_;
546 std::unique_ptr<WallpaperController> wallpaper_controller_; 560 std::unique_ptr<WallpaperController> wallpaper_controller_;
561 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
547 std::unique_ptr<::wm::ShadowController> shadow_controller_; 562 std::unique_ptr<::wm::ShadowController> shadow_controller_;
548 std::unique_ptr<::wm::VisibilityController> visibility_controller_; 563 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
549 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; 564 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
565 scoped_refptr<preferences::PrefClientStore> pref_store_;
550 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; 566 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_;
551 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; 567 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
552 LinkHandlerModelFactory* link_handler_model_factory_; 568 LinkHandlerModelFactory* link_handler_model_factory_;
553 std::unique_ptr<PowerButtonController> power_button_controller_; 569 std::unique_ptr<PowerButtonController> power_button_controller_;
554 std::unique_ptr<LockStateController> lock_state_controller_; 570 std::unique_ptr<LockStateController> lock_state_controller_;
555 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; 571 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_;
556 std::unique_ptr<VideoDetector> video_detector_; 572 std::unique_ptr<VideoDetector> video_detector_;
557 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; 573 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_;
558 std::unique_ptr<HighContrastController> high_contrast_controller_; 574 std::unique_ptr<HighContrastController> high_contrast_controller_;
559 std::unique_ptr<MagnificationController> magnification_controller_; 575 std::unique_ptr<MagnificationController> magnification_controller_;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 base::ObserverList<ShellObserver> shell_observers_; 671 base::ObserverList<ShellObserver> shell_observers_;
656 672
657 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; 673 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
658 674
659 DISALLOW_COPY_AND_ASSIGN(Shell); 675 DISALLOW_COPY_AND_ASSIGN(Shell);
660 }; 676 };
661 677
662 } // namespace ash 678 } // namespace ash
663 679
664 #endif // ASH_SHELL_H_ 680 #endif // ASH_SHELL_H_
OLDNEW
« ash/mus/window_manager.cc ('K') | « ash/root_window_controller.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698