Avi Drissman | 3a215d1e | 2022-09-07 19:43:09 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 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" |
Sammie Quon | f6b30f9 | 2020-01-07 00:35:13 | [diff] [blame] | 10 | #include "ash/public/cpp/shelf_types.h" |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 11 | |
sky | 97f9a743 | 2017-05-09 05:14:31 | [diff] [blame] | 12 | namespace aura { |
| 13 | class Window; |
| 14 | } |
| 15 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 16 | namespace ash { |
| 17 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 18 | class ASH_EXPORT ShellObserver { |
| 19 | public: |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 20 | // Called when a casting session is started or stopped. |
| 21 | virtual void OnCastingSessionStartedOrStopped(bool started) {} |
| 22 | |
| 23 | // Invoked after a non-primary root window is created. |
varkha | c71444e5 | 2017-05-25 22:51:34 | [diff] [blame] | 24 | virtual void OnRootWindowAdded(aura::Window* root_window) {} |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 25 | |
Scott Violet | b4c5ceb | 2022-06-23 19:30:22 | [diff] [blame] | 26 | // Invoked when a root window is about to be shutdown. |
| 27 | virtual void OnRootWindowWillShutdown(aura::Window* root_window) {} |
| 28 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 29 | // Invoked when the shelf alignment in |root_window| is changed. |
Sammie Quon | f6b30f9 | 2020-01-07 00:35:13 | [diff] [blame] | 30 | virtual void OnShelfAlignmentChanged(aura::Window* root_window, |
| 31 | ShelfAlignment old_alignment) {} |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 32 | |
Aga Wronska | 4397114 | 2019-04-12 01:18:20 | [diff] [blame] | 33 | // Invoked when user work area insets (accessibility panel, docked magnifier, |
| 34 | // keyboard) in |root_window| changed. |
| 35 | // This notification is not fired when shelf bounds changed. |
| 36 | virtual void OnUserWorkAreaInsetsChanged(aura::Window* root_window) {} |
Aga Wronska | 0514fd6 | 2019-03-25 20:11:37 | [diff] [blame] | 37 | |
Ahmed Fakhry | f1dd847ae | 2019-03-28 22:15:21 | [diff] [blame] | 38 | // Invoked when entering or exiting fullscreen mode in |container|. |
| 39 | // |container| is always the active desk container. |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 40 | virtual void OnFullscreenStateChanged(bool is_fullscreen, |
Ahmed Fakhry | f1dd847ae | 2019-03-28 22:15:21 | [diff] [blame] | 41 | aura::Window* container) {} |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 42 | |
| 43 | // Invoked when |pinned_window| enter or exit pinned mode. |
varkha | 19d7e6c5 | 2017-05-25 21:15:30 | [diff] [blame] | 44 | virtual void OnPinnedStateChanged(aura::Window* pinned_window) {} |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 45 | |
Zach Helfinstein | bbb6bad | 2018-05-02 18:21:51 | [diff] [blame] | 46 | // Called when dictation is activated. |
| 47 | virtual void OnDictationStarted() {} |
| 48 | |
| 49 | // Called when dicatation is ended. |
| 50 | virtual void OnDictationEnded() {} |
| 51 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 52 | // Called at the end of Shell::Init. |
| 53 | virtual void OnShellInitialized() {} |
| 54 | |
Andrew Xu | 26c049d1 | 2019-02-07 20:04:30 | [diff] [blame] | 55 | // Called at the beginning of ~Shell. |
| 56 | virtual void OnShellDestroying() {} |
| 57 | |
Scott Violet | 17a6172 | 2017-06-19 17:54:31 | [diff] [blame] | 58 | // Called near the end of ~Shell. Shell::Get() still returns the Shell, but |
| 59 | // most of Shell's state has been deleted. |
| 60 | virtual void OnShellDestroyed() {} |
Scott Violet | 63f2cf09 | 2017-06-09 15:09:52 | [diff] [blame] | 61 | |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 62 | protected: |
| 63 | virtual ~ShellObserver() {} |
| 64 | }; |
| 65 | |
| 66 | } // namespace ash |
| 67 | |
| 68 | #endif // ASH_SHELL_OBSERVER_H_ |