| OLD | NEW |
| 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> |
| 11 | 11 |
| 12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 13 #include "ash/metrics/user_metrics_recorder.h" | 13 #include "ash/metrics/user_metrics_recorder.h" |
| 14 #include "ash/public/cpp/shelf_types.h" | 14 #include "ash/public/cpp/shelf_types.h" |
| 15 #include "ash/session/session_observer.h" | 15 #include "ash/session/session_observer.h" |
| 16 #include "ash/wm/cursor_manager_chromeos.h" | 16 #include "ash/wm/cursor_manager_chromeos.h" |
| 17 #include "ash/wm/system_modal_container_event_filter_delegate.h" | 17 #include "ash/wm/system_modal_container_event_filter_delegate.h" |
| 18 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
| 22 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
| 23 #include "ui/display/screen.h" | 23 #include "ui/display/screen.h" |
| 24 #include "ui/events/event_target.h" | 24 #include "ui/events/event_target.h" |
| 25 #include "ui/wm/core/cursor_manager.h" | 25 #include "ui/wm/core/cursor_manager.h" |
| 26 #include "ui/wm/public/activation_change_observer.h" | 26 #include "ui/wm/public/activation_change_observer.h" |
| 27 | 27 |
| 28 class PrefRegistrySimple; |
| 28 class PrefService; | 29 class PrefService; |
| 29 | 30 |
| 30 namespace aura { | 31 namespace aura { |
| 31 class RootWindow; | 32 class RootWindow; |
| 32 class UserActivityForwarder; | 33 class UserActivityForwarder; |
| 33 class Window; | 34 class Window; |
| 34 class WindowManagerClient; | 35 class WindowManagerClient; |
| 35 class WindowTreeClient; | 36 class WindowTreeClient; |
| 36 namespace client { | 37 namespace client { |
| 37 class ActivationClient; | 38 class ActivationClient; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 class LinkHandlerModelFactory; | 115 class LinkHandlerModelFactory; |
| 115 class LocaleNotificationController; | 116 class LocaleNotificationController; |
| 116 class LockStateController; | 117 class LockStateController; |
| 117 class LogoutConfirmationController; | 118 class LogoutConfirmationController; |
| 118 class MagnificationController; | 119 class MagnificationController; |
| 119 class MaximizeModeController; | 120 class MaximizeModeController; |
| 120 class MediaController; | 121 class MediaController; |
| 121 class MouseCursorEventFilter; | 122 class MouseCursorEventFilter; |
| 122 class MruWindowTracker; | 123 class MruWindowTracker; |
| 123 class NewWindowController; | 124 class NewWindowController; |
| 125 class NightLightController; |
| 124 class OverlayEventFilter; | 126 class OverlayEventFilter; |
| 125 class PaletteDelegate; | 127 class PaletteDelegate; |
| 126 class PartialMagnificationController; | 128 class PartialMagnificationController; |
| 127 class PowerButtonController; | 129 class PowerButtonController; |
| 128 class PowerEventObserver; | 130 class PowerEventObserver; |
| 129 class ProjectingObserver; | 131 class ProjectingObserver; |
| 130 class ResizeShadowController; | 132 class ResizeShadowController; |
| 131 class ResolutionNotificationController; | 133 class ResolutionNotificationController; |
| 132 class RootWindowController; | 134 class RootWindowController; |
| 133 class ShellPort; | 135 class ShellPort; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 254 |
| 253 static void set_window_manager_client(aura::WindowManagerClient* client) { | 255 static void set_window_manager_client(aura::WindowManagerClient* client) { |
| 254 window_manager_client_ = client; | 256 window_manager_client_ = client; |
| 255 } | 257 } |
| 256 static aura::WindowManagerClient* window_manager_client() { | 258 static aura::WindowManagerClient* window_manager_client() { |
| 257 return window_manager_client_; | 259 return window_manager_client_; |
| 258 } | 260 } |
| 259 | 261 |
| 260 static Config GetAshConfig(); | 262 static Config GetAshConfig(); |
| 261 | 263 |
| 264 // Registers all ash related prefs to the given |registry|. |
| 265 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 266 |
| 262 // Creates a default views::NonClientFrameView for use by windows in the | 267 // Creates a default views::NonClientFrameView for use by windows in the |
| 263 // Ash environment. | 268 // Ash environment. |
| 264 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 269 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 265 views::Widget* widget); | 270 views::Widget* widget); |
| 266 | 271 |
| 267 // Sets work area insets of the display containing |window|, pings observers. | 272 // Sets work area insets of the display containing |window|, pings observers. |
| 268 void SetDisplayWorkAreaInsets(aura::Window* window, | 273 void SetDisplayWorkAreaInsets(aura::Window* window, |
| 269 const gfx::Insets& insets); | 274 const gfx::Insets& insets); |
| 270 | 275 |
| 271 // Called when a casting session is started or stopped. | 276 // Called when a casting session is started or stopped. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 return logout_confirmation_controller_.get(); | 323 return logout_confirmation_controller_.get(); |
| 319 } | 324 } |
| 320 MaximizeModeController* maximize_mode_controller() { | 325 MaximizeModeController* maximize_mode_controller() { |
| 321 return maximize_mode_controller_.get(); | 326 return maximize_mode_controller_.get(); |
| 322 } | 327 } |
| 323 MediaController* media_controller() { return media_controller_.get(); } | 328 MediaController* media_controller() { return media_controller_.get(); } |
| 324 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } | 329 MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } |
| 325 NewWindowController* new_window_controller() { | 330 NewWindowController* new_window_controller() { |
| 326 return new_window_controller_.get(); | 331 return new_window_controller_.get(); |
| 327 } | 332 } |
| 333 NightLightController* night_light_controller() { |
| 334 return night_light_controller_.get(); |
| 335 } |
| 328 SessionController* session_controller() { return session_controller_.get(); } | 336 SessionController* session_controller() { return session_controller_.get(); } |
| 329 ShelfController* shelf_controller() { return shelf_controller_.get(); } | 337 ShelfController* shelf_controller() { return shelf_controller_.get(); } |
| 330 ShelfModel* shelf_model(); | 338 ShelfModel* shelf_model(); |
| 331 ShutdownController* shutdown_controller() { | 339 ShutdownController* shutdown_controller() { |
| 332 return shutdown_controller_.get(); | 340 return shutdown_controller_.get(); |
| 333 } | 341 } |
| 334 SystemTrayController* system_tray_controller() { | 342 SystemTrayController* system_tray_controller() { |
| 335 return system_tray_controller_.get(); | 343 return system_tray_controller_.get(); |
| 336 } | 344 } |
| 337 SystemTrayDelegate* system_tray_delegate() { | 345 SystemTrayDelegate* system_tray_delegate() { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 std::unique_ptr<KeyboardUI> keyboard_ui_; | 683 std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 676 std::unique_ptr<LocaleNotificationController> locale_notification_controller_; | 684 std::unique_ptr<LocaleNotificationController> locale_notification_controller_; |
| 677 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; | 685 std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| 678 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; | 686 std::unique_ptr<MaximizeModeController> maximize_mode_controller_; |
| 679 std::unique_ptr<MediaController> media_controller_; | 687 std::unique_ptr<MediaController> media_controller_; |
| 680 std::unique_ptr<MruWindowTracker> mru_window_tracker_; | 688 std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
| 681 std::unique_ptr<NewWindowController> new_window_controller_; | 689 std::unique_ptr<NewWindowController> new_window_controller_; |
| 682 std::unique_ptr<PaletteDelegate> palette_delegate_; | 690 std::unique_ptr<PaletteDelegate> palette_delegate_; |
| 683 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; | 691 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; |
| 684 std::unique_ptr<SessionController> session_controller_; | 692 std::unique_ptr<SessionController> session_controller_; |
| 693 std::unique_ptr<NightLightController> night_light_controller_; |
| 685 std::unique_ptr<ShelfController> shelf_controller_; | 694 std::unique_ptr<ShelfController> shelf_controller_; |
| 686 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; | 695 std::unique_ptr<ShelfWindowWatcher> shelf_window_watcher_; |
| 687 std::unique_ptr<ShellDelegate> shell_delegate_; | 696 std::unique_ptr<ShellDelegate> shell_delegate_; |
| 688 std::unique_ptr<ShutdownController> shutdown_controller_; | 697 std::unique_ptr<ShutdownController> shutdown_controller_; |
| 689 std::unique_ptr<SystemTrayController> system_tray_controller_; | 698 std::unique_ptr<SystemTrayController> system_tray_controller_; |
| 690 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 699 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 691 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; | 700 std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| 692 std::unique_ptr<ToastManager> toast_manager_; | 701 std::unique_ptr<ToastManager> toast_manager_; |
| 693 std::unique_ptr<VpnList> vpn_list_; | 702 std::unique_ptr<VpnList> vpn_list_; |
| 694 std::unique_ptr<WallpaperController> wallpaper_controller_; | 703 std::unique_ptr<WallpaperController> wallpaper_controller_; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 base::ObserverList<ShellObserver> shell_observers_; | 818 base::ObserverList<ShellObserver> shell_observers_; |
| 810 | 819 |
| 811 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 820 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 812 | 821 |
| 813 DISALLOW_COPY_AND_ASSIGN(Shell); | 822 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 814 }; | 823 }; |
| 815 | 824 |
| 816 } // namespace ash | 825 } // namespace ash |
| 817 | 826 |
| 818 #endif // ASH_SHELL_H_ | 827 #endif // ASH_SHELL_H_ |
| OLD | NEW |