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