Chromium Code Reviews| 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/common/session/session_state_observer.h" | 13 #include "ash/common/session/session_state_observer.h" |
| 14 #include "ash/metrics/user_metrics_recorder.h" | 14 #include "ash/metrics/user_metrics_recorder.h" |
| 15 #include "ash/public/cpp/shelf_types.h" | 15 #include "ash/public/cpp/shelf_types.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 PrefService; | |
| 29 | |
| 28 namespace aura { | 30 namespace aura { |
| 29 class RootWindow; | 31 class RootWindow; |
| 30 class UserActivityForwarder; | 32 class UserActivityForwarder; |
| 31 class Window; | 33 class Window; |
| 32 class WindowManagerClient; | 34 class WindowManagerClient; |
| 33 class WindowTreeClient; | 35 class WindowTreeClient; |
| 34 namespace client { | 36 namespace client { |
| 35 class ActivationClient; | 37 class ActivationClient; |
| 36 } | 38 } |
| 37 } | 39 } |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 51 namespace display { | 53 namespace display { |
| 52 class DisplayChangeObserver; | 54 class DisplayChangeObserver; |
| 53 class DisplayConfigurator; | 55 class DisplayConfigurator; |
| 54 class DisplayManager; | 56 class DisplayManager; |
| 55 } | 57 } |
| 56 | 58 |
| 57 namespace gfx { | 59 namespace gfx { |
| 58 class Insets; | 60 class Insets; |
| 59 } | 61 } |
| 60 | 62 |
| 61 namespace preferences { | |
| 62 class PrefClientStore; | |
| 63 } | |
| 64 | |
| 65 namespace ui { | 63 namespace ui { |
| 66 class UserActivityDetector; | 64 class UserActivityDetector; |
| 67 class UserActivityPowerManagerNotifier; | 65 class UserActivityPowerManagerNotifier; |
| 68 namespace devtools { | 66 namespace devtools { |
| 69 class UiDevToolsServer; | 67 class UiDevToolsServer; |
| 70 } | 68 } |
| 71 } | 69 } |
| 72 | 70 |
| 73 namespace views { | 71 namespace views { |
| 74 class NonClientFrameView; | 72 class NonClientFrameView; |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 void set_link_handler_model_factory( | 351 void set_link_handler_model_factory( |
| 354 LinkHandlerModelFactory* link_handler_model_factory) { | 352 LinkHandlerModelFactory* link_handler_model_factory) { |
| 355 link_handler_model_factory_ = link_handler_model_factory; | 353 link_handler_model_factory_ = link_handler_model_factory; |
| 356 } | 354 } |
| 357 PowerButtonController* power_button_controller() { | 355 PowerButtonController* power_button_controller() { |
| 358 return power_button_controller_.get(); | 356 return power_button_controller_.get(); |
| 359 } | 357 } |
| 360 LockStateController* lock_state_controller() { | 358 LockStateController* lock_state_controller() { |
| 361 return lock_state_controller_.get(); | 359 return lock_state_controller_.get(); |
| 362 } | 360 } |
| 363 preferences::PrefClientStore* pref_store() { return pref_store_.get(); } | 361 ::PrefService* pref_service() { return pref_service_.get(); } |
|
jonross
2017/03/27 14:26:38
Global namespace?
tibell
2017/03/28 00:34:31
Done.
| |
| 364 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } | 362 PaletteDelegate* palette_delegate() { return palette_delegate_.get(); } |
| 365 ShellDelegate* shell_delegate() { return shell_delegate_.get(); } | 363 ShellDelegate* shell_delegate() { return shell_delegate_.get(); } |
| 366 VideoDetector* video_detector() { return video_detector_.get(); } | 364 VideoDetector* video_detector() { return video_detector_.get(); } |
| 367 WallpaperController* wallpaper_controller() { | 365 WallpaperController* wallpaper_controller() { |
| 368 return wallpaper_controller_.get(); | 366 return wallpaper_controller_.get(); |
| 369 } | 367 } |
| 370 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); } | 368 WallpaperDelegate* wallpaper_delegate() { return wallpaper_delegate_.get(); } |
| 371 WindowTreeHostManager* window_tree_host_manager() { | 369 WindowTreeHostManager* window_tree_host_manager() { |
| 372 return window_tree_host_manager_.get(); | 370 return window_tree_host_manager_.get(); |
| 373 } | 371 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 618 ui::EventTargeter* GetEventTargeter() override; | 616 ui::EventTargeter* GetEventTargeter() override; |
| 619 | 617 |
| 620 // aura::client::ActivationChangeObserver: | 618 // aura::client::ActivationChangeObserver: |
| 621 void OnWindowActivated(ActivationReason reason, | 619 void OnWindowActivated(ActivationReason reason, |
| 622 aura::Window* gained_active, | 620 aura::Window* gained_active, |
| 623 aura::Window* lost_active) override; | 621 aura::Window* lost_active) override; |
| 624 | 622 |
| 625 // SessionStateObserver: | 623 // SessionStateObserver: |
| 626 void SessionStateChanged(session_manager::SessionState state) override; | 624 void SessionStateChanged(session_manager::SessionState state) override; |
| 627 | 625 |
| 626 void OnPrefServiceInitialized(std::unique_ptr<::PrefService> pref_service); | |
|
jonross
2017/03/27 14:26:38
Nit: doc that this is a callback for prefs::Connec
tibell
2017/03/28 00:34:31
Done.
| |
| 627 | |
| 628 static Shell* instance_; | 628 static Shell* instance_; |
| 629 | 629 |
| 630 // Only valid in mash, for classic ash this is null. | 630 // Only valid in mash, for classic ash this is null. |
| 631 static aura::WindowTreeClient* window_tree_client_; | 631 static aura::WindowTreeClient* window_tree_client_; |
| 632 static aura::WindowManagerClient* window_manager_client_; | 632 static aura::WindowManagerClient* window_manager_client_; |
| 633 | 633 |
| 634 // If set before the Shell is initialized, the mouse cursor will be hidden | 634 // If set before the Shell is initialized, the mouse cursor will be hidden |
| 635 // when the screen is initially created. | 635 // when the screen is initially created. |
| 636 static bool initially_hide_cursor_; | 636 static bool initially_hide_cursor_; |
| 637 | 637 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 671 std::unique_ptr<ShellDelegate> shell_delegate_; | 671 std::unique_ptr<ShellDelegate> shell_delegate_; |
| 672 std::unique_ptr<SystemTrayController> system_tray_controller_; | 672 std::unique_ptr<SystemTrayController> system_tray_controller_; |
| 673 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; | 673 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| 674 std::unique_ptr<ToastManager> toast_manager_; | 674 std::unique_ptr<ToastManager> toast_manager_; |
| 675 std::unique_ptr<WallpaperController> wallpaper_controller_; | 675 std::unique_ptr<WallpaperController> wallpaper_controller_; |
| 676 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; | 676 std::unique_ptr<WallpaperDelegate> wallpaper_delegate_; |
| 677 std::unique_ptr<::wm::ShadowController> shadow_controller_; | 677 std::unique_ptr<::wm::ShadowController> shadow_controller_; |
| 678 std::unique_ptr<::wm::VisibilityController> visibility_controller_; | 678 std::unique_ptr<::wm::VisibilityController> visibility_controller_; |
| 679 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; | 679 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; |
| 680 std::unique_ptr<app_list::AppList> app_list_; | 680 std::unique_ptr<app_list::AppList> app_list_; |
| 681 scoped_refptr<preferences::PrefClientStore> pref_store_; | 681 std::unique_ptr<::PrefService> pref_service_; |
| 682 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; | 682 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; |
| 683 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; | 683 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; |
| 684 LinkHandlerModelFactory* link_handler_model_factory_; | 684 LinkHandlerModelFactory* link_handler_model_factory_; |
| 685 std::unique_ptr<PowerButtonController> power_button_controller_; | 685 std::unique_ptr<PowerButtonController> power_button_controller_; |
| 686 std::unique_ptr<LockStateController> lock_state_controller_; | 686 std::unique_ptr<LockStateController> lock_state_controller_; |
| 687 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; | 687 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; |
| 688 std::unique_ptr<VideoDetector> video_detector_; | 688 std::unique_ptr<VideoDetector> video_detector_; |
| 689 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; | 689 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; |
| 690 std::unique_ptr<HighContrastController> high_contrast_controller_; | 690 std::unique_ptr<HighContrastController> high_contrast_controller_; |
| 691 std::unique_ptr<MagnificationController> magnification_controller_; | 691 std::unique_ptr<MagnificationController> magnification_controller_; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 788 base::ObserverList<ShellObserver> shell_observers_; | 788 base::ObserverList<ShellObserver> shell_observers_; |
| 789 | 789 |
| 790 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 790 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 791 | 791 |
| 792 DISALLOW_COPY_AND_ASSIGN(Shell); | 792 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 793 }; | 793 }; |
| 794 | 794 |
| 795 } // namespace ash | 795 } // namespace ash |
| 796 | 796 |
| 797 #endif // ASH_SHELL_H_ | 797 #endif // ASH_SHELL_H_ |
| OLD | NEW |