| 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> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 class DisplayColorManager; | 95 class DisplayColorManager; |
| 96 class DisplayConfigurationController; | 96 class DisplayConfigurationController; |
| 97 class WindowTreeHostManager; | 97 class WindowTreeHostManager; |
| 98 class DisplayErrorObserver; | 98 class DisplayErrorObserver; |
| 99 class DisplayManager; | 99 class DisplayManager; |
| 100 class DragDropController; | 100 class DragDropController; |
| 101 class EventClientImpl; | 101 class EventClientImpl; |
| 102 class EventRewriterEventFilter; | 102 class EventRewriterEventFilter; |
| 103 class EventTransformationHandler; | 103 class EventTransformationHandler; |
| 104 class FirstRunHelper; | 104 class FirstRunHelper; |
| 105 class FocusCycler; | |
| 106 class GPUSupport; | 105 class GPUSupport; |
| 107 class HighContrastController; | 106 class HighContrastController; |
| 108 class KeyboardUI; | 107 class KeyboardUI; |
| 109 class KeyboardUMAEventFilter; | 108 class KeyboardUMAEventFilter; |
| 110 class LastWindowClosedLogoutReminder; | 109 class LastWindowClosedLogoutReminder; |
| 111 class LinkHandlerModelFactory; | 110 class LinkHandlerModelFactory; |
| 112 class LocaleNotificationController; | 111 class LocaleNotificationController; |
| 113 class LockStateController; | 112 class LockStateController; |
| 114 class LogoutConfirmationController; | 113 class LogoutConfirmationController; |
| 115 class MagnificationController; | 114 class MagnificationController; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // RootWindow's delegate interface. | 175 // RootWindow's delegate interface. |
| 177 // | 176 // |
| 178 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 177 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 179 // takes ownership of the Shell. | 178 // takes ownership of the Shell. |
| 180 class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate, | 179 class ASH_EXPORT Shell : public SystemModalContainerEventFilterDelegate, |
| 181 public ui::EventTarget, | 180 public ui::EventTarget, |
| 182 public aura::client::ActivationChangeObserver { | 181 public aura::client::ActivationChangeObserver { |
| 183 public: | 182 public: |
| 184 typedef std::vector<RootWindowController*> RootWindowControllerList; | 183 typedef std::vector<RootWindowController*> RootWindowControllerList; |
| 185 | 184 |
| 186 enum Direction { | |
| 187 FORWARD, | |
| 188 BACKWARD | |
| 189 }; | |
| 190 | |
| 191 // A shell must be explicitly created so that it can call |Init()| with the | 185 // A shell must be explicitly created so that it can call |Init()| with the |
| 192 // delegate set. |delegate| can be NULL (if not required for initialization). | 186 // delegate set. |delegate| can be NULL (if not required for initialization). |
| 193 // Takes ownership of |delegate|. | 187 // Takes ownership of |delegate|. |
| 194 static Shell* CreateInstance(const ShellInitParams& init_params); | 188 static Shell* CreateInstance(const ShellInitParams& init_params); |
| 195 | 189 |
| 196 // Should never be called before |CreateInstance()|. | 190 // Should never be called before |CreateInstance()|. |
| 197 static Shell* GetInstance(); | 191 static Shell* GetInstance(); |
| 198 | 192 |
| 199 // Returns true if the ash shell has been instantiated. | 193 // Returns true if the ash shell has been instantiated. |
| 200 static bool HasInstance(); | 194 static bool HasInstance(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // For testing only: set simulation that a modal window is open | 262 // For testing only: set simulation that a modal window is open |
| 269 void SimulateModalWindowOpenForTesting(bool modal_window_open) { | 263 void SimulateModalWindowOpenForTesting(bool modal_window_open) { |
| 270 simulate_modal_window_open_for_testing_ = modal_window_open; | 264 simulate_modal_window_open_for_testing_ = modal_window_open; |
| 271 } | 265 } |
| 272 | 266 |
| 273 // Creates a default views::NonClientFrameView for use by windows in the | 267 // Creates a default views::NonClientFrameView for use by windows in the |
| 274 // Ash environment. | 268 // Ash environment. |
| 275 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 269 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 276 views::Widget* widget); | 270 views::Widget* widget); |
| 277 | 271 |
| 278 // Rotates focus through containers that can receive focus. | |
| 279 void RotateFocus(Direction direction); | |
| 280 | |
| 281 // Sets the work area insets of the display that contains |window|, | 272 // Sets the work area insets of the display that contains |window|, |
| 282 // this notifies observers too. | 273 // this notifies observers too. |
| 283 // TODO(sky): this no longer really replicates what happens and is unreliable. | 274 // TODO(sky): this no longer really replicates what happens and is unreliable. |
| 284 // Remove this. | 275 // Remove this. |
| 285 void SetDisplayWorkAreaInsets(aura::Window* window, | 276 void SetDisplayWorkAreaInsets(aura::Window* window, |
| 286 const gfx::Insets& insets); | 277 const gfx::Insets& insets); |
| 287 | 278 |
| 288 // Called when the user logs in. | 279 // Called when the user logs in. |
| 289 void OnLoginStateChanged(LoginStatus status); | 280 void OnLoginStateChanged(LoginStatus status); |
| 290 | 281 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 } | 369 } |
| 379 VideoDetector* video_detector() { | 370 VideoDetector* video_detector() { |
| 380 return video_detector_.get(); | 371 return video_detector_.get(); |
| 381 } | 372 } |
| 382 WindowCycleController* window_cycle_controller() { | 373 WindowCycleController* window_cycle_controller() { |
| 383 return window_cycle_controller_.get(); | 374 return window_cycle_controller_.get(); |
| 384 } | 375 } |
| 385 WindowSelectorController* window_selector_controller() { | 376 WindowSelectorController* window_selector_controller() { |
| 386 return window_selector_controller_.get(); | 377 return window_selector_controller_.get(); |
| 387 } | 378 } |
| 388 FocusCycler* focus_cycler() { return focus_cycler_.get(); } | |
| 389 WindowTreeHostManager* window_tree_host_manager() { | 379 WindowTreeHostManager* window_tree_host_manager() { |
| 390 return window_tree_host_manager_.get(); | 380 return window_tree_host_manager_.get(); |
| 391 } | 381 } |
| 392 #if defined(OS_CHROMEOS) | 382 #if defined(OS_CHROMEOS) |
| 393 PowerEventObserver* power_event_observer() { | 383 PowerEventObserver* power_event_observer() { |
| 394 return power_event_observer_.get(); | 384 return power_event_observer_.get(); |
| 395 } | 385 } |
| 396 TouchTransformerController* touch_transformer_controller() { | 386 TouchTransformerController* touch_transformer_controller() { |
| 397 return touch_transformer_controller_.get(); | 387 return touch_transformer_controller_.get(); |
| 398 } | 388 } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; | 673 std::unique_ptr<::wm::WindowModalityController> window_modality_controller_; |
| 684 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; | 674 std::unique_ptr<views::corewm::TooltipController> tooltip_controller_; |
| 685 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_; | 675 std::unique_ptr<DesktopBackgroundController> desktop_background_controller_; |
| 686 LinkHandlerModelFactory* link_handler_model_factory_; | 676 LinkHandlerModelFactory* link_handler_model_factory_; |
| 687 std::unique_ptr<PowerButtonController> power_button_controller_; | 677 std::unique_ptr<PowerButtonController> power_button_controller_; |
| 688 std::unique_ptr<LockStateController> lock_state_controller_; | 678 std::unique_ptr<LockStateController> lock_state_controller_; |
| 689 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; | 679 std::unique_ptr<ui::UserActivityDetector> user_activity_detector_; |
| 690 std::unique_ptr<VideoDetector> video_detector_; | 680 std::unique_ptr<VideoDetector> video_detector_; |
| 691 std::unique_ptr<WindowCycleController> window_cycle_controller_; | 681 std::unique_ptr<WindowCycleController> window_cycle_controller_; |
| 692 std::unique_ptr<WindowSelectorController> window_selector_controller_; | 682 std::unique_ptr<WindowSelectorController> window_selector_controller_; |
| 693 std::unique_ptr<FocusCycler> focus_cycler_; | |
| 694 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; | 683 std::unique_ptr<WindowTreeHostManager> window_tree_host_manager_; |
| 695 std::unique_ptr<HighContrastController> high_contrast_controller_; | 684 std::unique_ptr<HighContrastController> high_contrast_controller_; |
| 696 std::unique_ptr<MagnificationController> magnification_controller_; | 685 std::unique_ptr<MagnificationController> magnification_controller_; |
| 697 std::unique_ptr<PartialMagnificationController> | 686 std::unique_ptr<PartialMagnificationController> |
| 698 partial_magnification_controller_; | 687 partial_magnification_controller_; |
| 699 std::unique_ptr<AutoclickController> autoclick_controller_; | 688 std::unique_ptr<AutoclickController> autoclick_controller_; |
| 700 std::unique_ptr<aura::client::FocusClient> focus_client_; | 689 std::unique_ptr<aura::client::FocusClient> focus_client_; |
| 701 | 690 |
| 702 aura::client::ActivationClient* activation_client_; | 691 aura::client::ActivationClient* activation_client_; |
| 703 | 692 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 bool in_mus_ = false; | 776 bool in_mus_ = false; |
| 788 | 777 |
| 789 std::unique_ptr<KeyboardUI> keyboard_ui_; | 778 std::unique_ptr<KeyboardUI> keyboard_ui_; |
| 790 | 779 |
| 791 DISALLOW_COPY_AND_ASSIGN(Shell); | 780 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 792 }; | 781 }; |
| 793 | 782 |
| 794 } // namespace ash | 783 } // namespace ash |
| 795 | 784 |
| 796 #endif // ASH_SHELL_H_ | 785 #endif // ASH_SHELL_H_ |
| OLD | NEW |