| 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_OBSERVER_H_ | 5 #ifndef ASH_SHELL_OBSERVER_H_ |
| 6 #define ASH_SHELL_OBSERVER_H_ | 6 #define ASH_SHELL_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/system/user/login_status.h" | 9 #include "ash/system/user/login_status.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace ash { |
| 12 class Window; | |
| 13 } | |
| 14 | 12 |
| 15 namespace ash { | 13 class WmWindow; |
| 16 | 14 |
| 17 class ASH_EXPORT ShellObserver { | 15 class ASH_EXPORT ShellObserver { |
| 18 public: | 16 public: |
| 19 // Invoked after the screen's work area insets changes. | 17 // Invoked after the screen's work area insets changes. |
| 20 virtual void OnDisplayWorkAreaInsetsChanged() {} | 18 virtual void OnDisplayWorkAreaInsetsChanged() {} |
| 21 | 19 |
| 22 // Invoked when the user logs in. | 20 // Invoked when the user logs in. |
| 23 virtual void OnLoginStateChanged(user::LoginStatus status) {} | 21 virtual void OnLoginStateChanged(user::LoginStatus status) {} |
| 24 | 22 |
| 25 // Invoked when the application is exiting. | 23 // Invoked when the application is exiting. |
| 26 virtual void OnAppTerminating() {} | 24 virtual void OnAppTerminating() {} |
| 27 | 25 |
| 28 // Invoked when the screen is locked (after the lock window is visible) or | 26 // Invoked when the screen is locked (after the lock window is visible) or |
| 29 // unlocked. | 27 // unlocked. |
| 30 virtual void OnLockStateChanged(bool locked) {} | 28 virtual void OnLockStateChanged(bool locked) {} |
| 31 | 29 |
| 32 // Called when a casting session is started or stopped. | 30 // Called when a casting session is started or stopped. |
| 33 virtual void OnCastingSessionStartedOrStopped(bool started) {} | 31 virtual void OnCastingSessionStartedOrStopped(bool started) {} |
| 34 | 32 |
| 35 // Invoked after a non-primary root window is created. | 33 // Invoked after a non-primary root window is created. |
| 36 virtual void OnRootWindowAdded(aura::Window* root_window) {} | 34 virtual void OnRootWindowAdded(WmWindow* root_window) {} |
| 37 | 35 |
| 38 // Invoked after the shelf has been created for |root_window|. | 36 // Invoked after the shelf has been created for |root_window|. |
| 39 virtual void OnShelfCreatedForRootWindow(aura::Window* root_window) {} | 37 virtual void OnShelfCreatedForRootWindow(WmWindow* root_window) {} |
| 40 | 38 |
| 41 // Invoked when the shelf alignment in |root_window| is changed. | 39 // Invoked when the shelf alignment in |root_window| is changed. |
| 42 virtual void OnShelfAlignmentChanged(aura::Window* root_window) {} | 40 virtual void OnShelfAlignmentChanged(WmWindow* root_window) {} |
| 43 | 41 |
| 44 // Invoked when the shelf auto-hide behavior in |root_window| is changed. | 42 // Invoked when the shelf auto-hide behavior in |root_window| is changed. |
| 45 virtual void OnShelfAutoHideBehaviorChanged(aura::Window* root_window) {} | 43 virtual void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) {} |
| 46 | 44 |
| 47 // Invoked when the projection touch HUD is toggled. | 45 // Invoked when the projection touch HUD is toggled. |
| 48 virtual void OnTouchHudProjectionToggled(bool enabled) {} | 46 virtual void OnTouchHudProjectionToggled(bool enabled) {} |
| 49 | 47 |
| 50 // Invoked when entering or exiting fullscreen mode in |root_window|. | 48 // Invoked when entering or exiting fullscreen mode in |root_window|. |
| 51 virtual void OnFullscreenStateChanged(bool is_fullscreen, | 49 virtual void OnFullscreenStateChanged(bool is_fullscreen, |
| 52 aura::Window* root_window) {} | 50 WmWindow* root_window) {} |
| 53 | 51 |
| 54 // Called when the overview mode is about to be started (before the windows | 52 // Called when the overview mode is about to be started (before the windows |
| 55 // get re-arranged). | 53 // get re-arranged). |
| 56 virtual void OnOverviewModeStarting() {} | 54 virtual void OnOverviewModeStarting() {} |
| 57 | 55 |
| 58 // Called after overview mode has ended. | 56 // Called after overview mode has ended. |
| 59 virtual void OnOverviewModeEnded() {} | 57 virtual void OnOverviewModeEnded() {} |
| 60 | 58 |
| 61 // Called when the always maximize mode has started. Windows might still | 59 // Called when the always maximize mode has started. Windows might still |
| 62 // animate though. | 60 // animate though. |
| 63 virtual void OnMaximizeModeStarted() {} | 61 virtual void OnMaximizeModeStarted() {} |
| 64 | 62 |
| 65 // Called when the always maximize mode has ended. Windows may still be | 63 // Called when the always maximize mode has ended. Windows may still be |
| 66 // animating but have been restored. | 64 // animating but have been restored. |
| 67 virtual void OnMaximizeModeEnded() {} | 65 virtual void OnMaximizeModeEnded() {} |
| 68 | 66 |
| 69 // Called at the end of Shell::Init. | 67 // Called at the end of Shell::Init. |
| 70 virtual void OnShellInitialized() {} | 68 virtual void OnShellInitialized() {} |
| 71 | 69 |
| 72 protected: | 70 protected: |
| 73 virtual ~ShellObserver() {} | 71 virtual ~ShellObserver() {} |
| 74 }; | 72 }; |
| 75 | 73 |
| 76 } // namespace ash | 74 } // namespace ash |
| 77 | 75 |
| 78 #endif // ASH_SHELL_OBSERVER_H_ | 76 #endif // ASH_SHELL_OBSERVER_H_ |
| OLD | NEW |