| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_WM_SHELL_H_ | 5 #ifndef ASH_COMMON_WM_SHELL_H_ |
| 6 #define ASH_COMMON_WM_SHELL_H_ | 6 #define ASH_COMMON_WM_SHELL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 class SystemTrayController; | 83 class SystemTrayController; |
| 84 class SystemTrayNotifier; | 84 class SystemTrayNotifier; |
| 85 class ToastManager; | 85 class ToastManager; |
| 86 class VpnList; | 86 class VpnList; |
| 87 class WallpaperController; | 87 class WallpaperController; |
| 88 class WallpaperDelegate; | 88 class WallpaperDelegate; |
| 89 class WindowCycleController; | 89 class WindowCycleController; |
| 90 class WindowCycleEventFilter; | 90 class WindowCycleEventFilter; |
| 91 class WindowResizer; | 91 class WindowResizer; |
| 92 class WindowSelectorController; | 92 class WindowSelectorController; |
| 93 class WmActivationObserver; | |
| 94 class WmDisplayObserver; | 93 class WmDisplayObserver; |
| 95 class WmWindow; | 94 class WmWindow; |
| 96 class WorkspaceEventHandler; | 95 class WorkspaceEventHandler; |
| 97 | 96 |
| 98 enum class LoginStatus; | 97 enum class LoginStatus; |
| 99 enum class TaskSwitchSource; | 98 enum class TaskSwitchSource; |
| 100 | 99 |
| 101 namespace wm { | 100 namespace wm { |
| 102 class MaximizeModeEventHandler; | 101 class MaximizeModeEventHandler; |
| 103 class WindowState; | 102 class WindowState; |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 // Notify observers that |root_window|'s shelf changed auto-hide alignment. | 401 // Notify observers that |root_window|'s shelf changed auto-hide alignment. |
| 403 // TODO(jamescook): Move to Shelf. | 402 // TODO(jamescook): Move to Shelf. |
| 404 void NotifyShelfAlignmentChanged(WmWindow* root_window); | 403 void NotifyShelfAlignmentChanged(WmWindow* root_window); |
| 405 | 404 |
| 406 // Notify observers that |root_window|'s shelf changed auto-hide behavior. | 405 // Notify observers that |root_window|'s shelf changed auto-hide behavior. |
| 407 // TODO(jamescook): Move to Shelf. | 406 // TODO(jamescook): Move to Shelf. |
| 408 void NotifyShelfAutoHideBehaviorChanged(WmWindow* root_window); | 407 void NotifyShelfAutoHideBehaviorChanged(WmWindow* root_window); |
| 409 | 408 |
| 410 virtual SessionStateDelegate* GetSessionStateDelegate() = 0; | 409 virtual SessionStateDelegate* GetSessionStateDelegate() = 0; |
| 411 | 410 |
| 412 void AddActivationObserver(WmActivationObserver* observer); | |
| 413 void RemoveActivationObserver(WmActivationObserver* observer); | |
| 414 | |
| 415 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; | 411 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; |
| 416 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; | 412 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; |
| 417 | 413 |
| 418 void AddShellObserver(ShellObserver* observer); | 414 void AddShellObserver(ShellObserver* observer); |
| 419 void RemoveShellObserver(ShellObserver* observer); | 415 void RemoveShellObserver(ShellObserver* observer); |
| 420 | 416 |
| 421 // If |events| is PointerWatcherEventTypes::MOVES, | 417 // If |events| is PointerWatcherEventTypes::MOVES, |
| 422 // PointerWatcher::OnPointerEventObserved() is called for pointer move events. | 418 // PointerWatcher::OnPointerEventObserved() is called for pointer move events. |
| 423 // If |events| is PointerWatcherEventTypes::DRAGS, | 419 // If |events| is PointerWatcherEventTypes::DRAGS, |
| 424 // PointerWatcher::OnPointerEventObserved() is called for pointer drag events. | 420 // PointerWatcher::OnPointerEventObserved() is called for pointer drag events. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 private: | 487 private: |
| 492 friend class AcceleratorControllerTest; | 488 friend class AcceleratorControllerTest; |
| 493 friend class ScopedRootWindowForNewWindows; | 489 friend class ScopedRootWindowForNewWindows; |
| 494 friend class Shell; | 490 friend class Shell; |
| 495 friend class WmShellTestApi; | 491 friend class WmShellTestApi; |
| 496 | 492 |
| 497 // aura::client::ActivationChangeObserver: | 493 // aura::client::ActivationChangeObserver: |
| 498 void OnWindowActivated(ActivationReason reason, | 494 void OnWindowActivated(ActivationReason reason, |
| 499 aura::Window* gained_active, | 495 aura::Window* gained_active, |
| 500 aura::Window* lost_active) override; | 496 aura::Window* lost_active) override; |
| 501 void OnAttemptToReactivateWindow(aura::Window* request_active, | |
| 502 aura::Window* actual_active) override; | |
| 503 | 497 |
| 504 static WmShell* instance_; | 498 static WmShell* instance_; |
| 505 | 499 |
| 506 base::ObserverList<ShellObserver> shell_observers_; | 500 base::ObserverList<ShellObserver> shell_observers_; |
| 507 std::unique_ptr<ShellDelegate> delegate_; | 501 std::unique_ptr<ShellDelegate> delegate_; |
| 508 | 502 |
| 509 scoped_refptr<preferences::PrefClientStore> pref_store_; | 503 scoped_refptr<preferences::PrefClientStore> pref_store_; |
| 510 | 504 |
| 511 std::unique_ptr<AcceleratorController> accelerator_controller_; | 505 std::unique_ptr<AcceleratorController> accelerator_controller_; |
| 512 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; | 506 std::unique_ptr<AccessibilityDelegate> accessibility_delegate_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 542 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; | 536 std::unique_ptr<ui::devtools::UiDevToolsServer> devtools_server_; |
| 543 | 537 |
| 544 base::ObserverList<LockStateObserver> lock_state_observers_; | 538 base::ObserverList<LockStateObserver> lock_state_observers_; |
| 545 | 539 |
| 546 // See comment for GetRootWindowForNewWindows(). | 540 // See comment for GetRootWindowForNewWindows(). |
| 547 WmWindow* root_window_for_new_windows_ = nullptr; | 541 WmWindow* root_window_for_new_windows_ = nullptr; |
| 548 WmWindow* scoped_root_window_for_new_windows_ = nullptr; | 542 WmWindow* scoped_root_window_for_new_windows_ = nullptr; |
| 549 | 543 |
| 550 bool simulate_modal_window_open_for_testing_ = false; | 544 bool simulate_modal_window_open_for_testing_ = false; |
| 551 | 545 |
| 552 bool added_activation_observer_ = false; | |
| 553 base::ObserverList<WmActivationObserver> activation_observers_; | |
| 554 | |
| 555 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 546 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 556 }; | 547 }; |
| 557 | 548 |
| 558 } // namespace ash | 549 } // namespace ash |
| 559 | 550 |
| 560 #endif // ASH_COMMON_WM_SHELL_H_ | 551 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |