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

Side by Side Diff: ash/shell.h

Issue 2761063002: Move 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
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/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 (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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 namespace ash { 89 namespace ash {
90 90
91 class AcceleratorController; 91 class AcceleratorController;
92 class AccessibilityDelegate; 92 class AccessibilityDelegate;
93 class AppListDelegateImpl; 93 class AppListDelegateImpl;
94 class AshNativeCursorManager; 94 class AshNativeCursorManager;
95 class AshTouchTransformController; 95 class AshTouchTransformController;
96 class AutoclickController; 96 class AutoclickController;
97 class BluetoothNotificationController; 97 class BluetoothNotificationController;
98 class BrightnessControlDelegate;
99 class CastConfigController;
98 class DisplayColorManager; 100 class DisplayColorManager;
99 class DisplayConfigurationController; 101 class DisplayConfigurationController;
100 class DisplayErrorObserver; 102 class DisplayErrorObserver;
101 class DragDropController; 103 class DragDropController;
102 class EventClientImpl; 104 class EventClientImpl;
103 class EventTransformationHandler; 105 class EventTransformationHandler;
104 class FirstRunHelper; 106 class FirstRunHelper;
107 class FocusCycler;
105 class GPUSupport; 108 class GPUSupport;
106 class HighContrastController; 109 class HighContrastController;
107 class ImmersiveHandlerFactoryAsh; 110 class ImmersiveHandlerFactoryAsh;
111 class KeyboardBrightnessControlDelegate;
112 class KeyboardUI;
108 class LaserPointerController; 113 class LaserPointerController;
109 class LinkHandlerModelFactory; 114 class LinkHandlerModelFactory;
115 class LocaleNotificationController;
110 class LockStateController; 116 class LockStateController;
111 enum class LoginStatus; 117 enum class LoginStatus;
118 class LogoutConfirmationController;
112 class MagnificationController; 119 class MagnificationController;
113 class MouseCursorEventFilter; 120 class MouseCursorEventFilter;
114 class OverlayEventFilter; 121 class OverlayEventFilter;
115 class PaletteDelegate; 122 class PaletteDelegate;
116 class PartialMagnificationController; 123 class PartialMagnificationController;
117 class PowerButtonController; 124 class PowerButtonController;
118 class PowerEventObserver; 125 class PowerEventObserver;
119 class ProjectingObserver; 126 class ProjectingObserver;
120 class ResizeShadowController; 127 class ResizeShadowController;
121 class ResolutionNotificationController; 128 class ResolutionNotificationController;
122 class RootWindowController; 129 class RootWindowController;
123 class ScopedOverviewAnimationSettingsFactoryAura; 130 class ScopedOverviewAnimationSettingsFactoryAura;
124 class ScreenOrientationController; 131 class ScreenOrientationController;
125 class ScreenshotController; 132 class ScreenshotController;
126 class ScreenPinningController; 133 class ScreenPinningController;
127 class ScreenPositionController; 134 class ScreenPositionController;
128 class SessionStateDelegate; 135 class SessionStateDelegate;
129 class ShellDelegate; 136 class ShellDelegate;
130 struct ShellInitParams; 137 struct ShellInitParams;
131 class ShellObserver; 138 class ShellObserver;
132 class ShutdownObserver; 139 class ShutdownObserver;
133 class SmsObserver; 140 class SmsObserver;
134 class StickyKeysController; 141 class StickyKeysController;
135 class SystemGestureEventFilter; 142 class SystemGestureEventFilter;
136 class SystemModalContainerEventFilter; 143 class SystemModalContainerEventFilter;
137 class SystemTray; 144 class SystemTray;
145 class SystemTrayController;
146 class SystemTrayDelegate;
138 class ToplevelWindowEventHandler; 147 class ToplevelWindowEventHandler;
139 class ScreenLayoutObserver; 148 class ScreenLayoutObserver;
140 class ToastManager; 149 class ToastManager;
141 class VirtualKeyboardController; 150 class VirtualKeyboardController;
142 class VideoActivityNotifier; 151 class VideoActivityNotifier;
143 class VideoDetector; 152 class VideoDetector;
144 class WallpaperController; 153 class WallpaperController;
145 class WallpaperDelegate; 154 class WallpaperDelegate;
146 class WebNotificationTray; 155 class WebNotificationTray;
147 class WindowPositioner; 156 class WindowPositioner;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 AcceleratorController* accelerator_controller() { 285 AcceleratorController* accelerator_controller() {
277 return accelerator_controller_.get(); 286 return accelerator_controller_.get();
278 } 287 }
279 AccessibilityDelegate* accessibility_delegate() { 288 AccessibilityDelegate* accessibility_delegate() {
280 return accessibility_delegate_.get(); 289 return accessibility_delegate_.get();
281 } 290 }
282 app_list::AppList* app_list() { return app_list_.get(); } 291 app_list::AppList* app_list() { return app_list_.get(); }
283 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool() { 292 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool() {
284 return blocking_pool_; 293 return blocking_pool_;
285 } 294 }
295 BrightnessControlDelegate* brightness_control_delegate() {
296 return brightness_control_delegate_.get();
297 }
298 CastConfigController* cast_config() { return cast_config_.get(); }
286 display::DisplayManager* display_manager() { return display_manager_.get(); } 299 display::DisplayManager* display_manager() { return display_manager_.get(); }
287 DisplayConfigurationController* display_configuration_controller() { 300 DisplayConfigurationController* display_configuration_controller() {
288 return display_configuration_controller_.get(); 301 return display_configuration_controller_.get();
289 } 302 }
290 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); } 303 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
304 FocusCycler* focus_cycler() { return focus_cycler_.get(); }
305 KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() {
306 return keyboard_brightness_control_delegate_.get();
307 }
308 KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
309 LocaleNotificationController* locale_notification_controller() {
310 return locale_notification_controller_.get();
311 }
312 LogoutConfirmationController* logout_confirmation_controller() {
313 return logout_confirmation_controller_.get();
314 }
315 SystemTrayController* system_tray_controller() {
msw 2017/03/20 22:00:40 nit: these probably belong lower for abc ordering.
sky 2017/03/20 22:07:38 I think it's mostly a mess here and I'm holding of
316 return system_tray_controller_.get();
317 }
318 SystemTrayDelegate* system_tray_delegate() {
319 return system_tray_delegate_.get();
320 }
291 views::corewm::TooltipController* tooltip_controller() { 321 views::corewm::TooltipController* tooltip_controller() {
292 return tooltip_controller_.get(); 322 return tooltip_controller_.get();
293 } 323 }
294 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); } 324 OverlayEventFilter* overlay_filter() { return overlay_filter_.get(); }
295 LinkHandlerModelFactory* link_handler_model_factory() { 325 LinkHandlerModelFactory* link_handler_model_factory() {
296 return link_handler_model_factory_; 326 return link_handler_model_factory_;
297 } 327 }
298 void set_link_handler_model_factory( 328 void set_link_handler_model_factory(
299 LinkHandlerModelFactory* link_handler_model_factory) { 329 LinkHandlerModelFactory* link_handler_model_factory) {
300 link_handler_model_factory_ = link_handler_model_factory; 330 link_handler_model_factory_ = link_handler_model_factory;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 void NotifyShelfAlignmentChanged(WmWindow* root_window); 537 void NotifyShelfAlignmentChanged(WmWindow* root_window);
508 538
509 // Notifies observers that |root_window|'s shelf changed auto-hide behavior. 539 // Notifies observers that |root_window|'s shelf changed auto-hide behavior.
510 // TODO(jamescook): Move to Shelf. 540 // TODO(jamescook): Move to Shelf.
511 void NotifyShelfAutoHideBehaviorChanged(WmWindow* root_window); 541 void NotifyShelfAutoHideBehaviorChanged(WmWindow* root_window);
512 542
513 private: 543 private:
514 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); 544 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
515 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); 545 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
516 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); 546 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
547 friend class AcceleratorControllerTest;
517 friend class RootWindowController; 548 friend class RootWindowController;
518 friend class ScopedRootWindowForNewWindows; 549 friend class ScopedRootWindowForNewWindows;
519 friend class SmsObserverTest; 550 friend class SmsObserverTest;
520 friend class test::ShellTestApi; 551 friend class test::ShellTestApi;
521 friend class shell::WindowWatcher; 552 friend class shell::WindowWatcher;
522 553
523 Shell(std::unique_ptr<ShellDelegate> shell_delegate, 554 Shell(std::unique_ptr<ShellDelegate> shell_delegate,
524 std::unique_ptr<WmShell> wm_shell); 555 std::unique_ptr<WmShell> wm_shell);
525 ~Shell() override; 556 ~Shell() override;
526 557
527 void Init(const ShellInitParams& init_params); 558 void Init(const ShellInitParams& init_params);
528 559
529 // Initializes virtual keyboard controller. 560 // Initializes virtual keyboard controller.
530 void InitKeyboard(); 561 void InitKeyboard();
531 562
532 // Initializes the root window so that it can host browser windows. 563 // Initializes the root window so that it can host browser windows.
533 void InitRootWindow(aura::Window* root_window); 564 void InitRootWindow(aura::Window* root_window);
534 565
566 // Helpers to set (and initialize) or destroy various delegates.
567 // TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported.
msw 2017/03/20 22:00:40 nit: maybe keep this comment in WmShell?
sky 2017/03/20 22:07:38 As discussed over IM I nuked the comment.
568 void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
569 void DeleteSystemTrayDelegate();
570
535 // Destroys all child windows including widgets across all roots. 571 // Destroys all child windows including widgets across all roots.
536 void CloseAllRootWindowChildWindows(); 572 void CloseAllRootWindowChildWindows();
537 573
538 // SystemModalContainerEventFilterDelegate: 574 // SystemModalContainerEventFilterDelegate:
539 bool CanWindowReceiveEvents(aura::Window* window) override; 575 bool CanWindowReceiveEvents(aura::Window* window) override;
540 576
541 // Overridden from ui::EventTarget: 577 // Overridden from ui::EventTarget:
542 bool CanAcceptEvent(const ui::Event& event) override; 578 bool CanAcceptEvent(const ui::Event& event) override;
543 EventTarget* GetParentTarget() override; 579 EventTarget* GetParentTarget() override;
544 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; 580 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
(...skipping 20 matching lines...) Expand all
565 601
566 // The CompoundEventFilter owned by aura::Env object. 602 // The CompoundEventFilter owned by aura::Env object.
567 std::unique_ptr<::wm::CompoundEventFilter> env_filter_; 603 std::unique_ptr<::wm::CompoundEventFilter> env_filter_;
568 604
569 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; 605 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_;
570 std::unique_ptr<SessionStateDelegate> session_state_delegate_; 606 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
571 std::unique_ptr<WindowPositioner> window_positioner_; 607 std::unique_ptr<WindowPositioner> window_positioner_;
572 608
573 std::unique_ptr<AcceleratorController> accelerator_controller_; 609 std::unique_ptr<AcceleratorController> accelerator_controller_;
574 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; 610 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_;
611 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate_;
612 std::unique_ptr<CastConfigController> cast_config_;
613 std::unique_ptr<DragDropController> drag_drop_controller_;
614 std::unique_ptr<FocusCycler> focus_cycler_;
615 std::unique_ptr<KeyboardBrightnessControlDelegate>
616 keyboard_brightness_control_delegate_;
617 std::unique_ptr<KeyboardUI> keyboard_ui_;
618 std::unique_ptr<LocaleNotificationController> locale_notification_controller_;
619 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_;
575 std::unique_ptr<PaletteDelegate> palette_delegate_; 620 std::unique_ptr<PaletteDelegate> palette_delegate_;
576 std::unique_ptr<DragDropController> drag_drop_controller_;
577 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; 621 std::unique_ptr<ResizeShadowController> resize_shadow_controller_;
578 std::unique_ptr<ShellDelegate> shell_delegate_; 622 std::unique_ptr<ShellDelegate> shell_delegate_;
623 std::unique_ptr<SystemTrayController> system_tray_controller_;
624 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_;
579 std::unique_ptr<ToastManager> toast_manager_; 625 std::unique_ptr<ToastManager> toast_manager_;
580 std::unique_ptr<WallpaperController> wallpaper_controller_; 626 std::unique_ptr<WallpaperController> wallpaper_controller_;
581 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; 627 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_;
582 std::unique_ptr<::wm::ShadowController> shadow_controller_; 628 std::unique_ptr<::wm::ShadowController> shadow_controller_;
583 std::unique_ptr<::wm::VisibilityController> visibility_controller_; 629 std::unique_ptr<::wm::VisibilityController> visibility_controller_;
584 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; 630 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_;
585 std::unique_ptr<app_list::AppList> app_list_; 631 std::unique_ptr<app_list::AppList> app_list_;
586 scoped_refptr<preferences::PrefClientStore> pref_store_; 632 scoped_refptr<preferences::PrefClientStore> pref_store_;
587 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; 633 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_;
588 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; 634 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 base::ObserverList<ShellObserver> shell_observers_; 738 base::ObserverList<ShellObserver> shell_observers_;
693 739
694 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; 740 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
695 741
696 DISALLOW_COPY_AND_ASSIGN(Shell); 742 DISALLOW_COPY_AND_ASSIGN(Shell);
697 }; 743 };
698 744
699 } // namespace ash 745 } // namespace ash
700 746
701 #endif // ASH_SHELL_H_ 747 #endif // ASH_SHELL_H_
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698