blob: 20f6b017eb85e646c9b696cf67b153e78b279679 [file] [log] [blame]
Avi Drissman3a215d1e2022-09-07 19:43:091// Copyright 2012 The Chromium Authors
James Cookb0bf8e82017-04-09 17:01:442// 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 Quonf6b30f92020-01-07 00:35:1310#include "ash/public/cpp/shelf_types.h"
James Cookb0bf8e82017-04-09 17:01:4411
sky97f9a7432017-05-09 05:14:3112namespace aura {
13class Window;
14}
15
James Cookb0bf8e82017-04-09 17:01:4416namespace ash {
17
James Cookb0bf8e82017-04-09 17:01:4418class ASH_EXPORT ShellObserver {
19 public:
James Cookb0bf8e82017-04-09 17:01:4420 // 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.
varkhac71444e52017-05-25 22:51:3424 virtual void OnRootWindowAdded(aura::Window* root_window) {}
James Cookb0bf8e82017-04-09 17:01:4425
Scott Violetb4c5ceb2022-06-23 19:30:2226 // Invoked when a root window is about to be shutdown.
27 virtual void OnRootWindowWillShutdown(aura::Window* root_window) {}
28
James Cookb0bf8e82017-04-09 17:01:4429 // Invoked when the shelf alignment in |root_window| is changed.
Sammie Quonf6b30f92020-01-07 00:35:1330 virtual void OnShelfAlignmentChanged(aura::Window* root_window,
31 ShelfAlignment old_alignment) {}
James Cookb0bf8e82017-04-09 17:01:4432
Aga Wronska43971142019-04-12 01:18:2033 // 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 Wronska0514fd62019-03-25 20:11:3737
Ahmed Fakhryf1dd847ae2019-03-28 22:15:2138 // Invoked when entering or exiting fullscreen mode in |container|.
39 // |container| is always the active desk container.
James Cookb0bf8e82017-04-09 17:01:4440 virtual void OnFullscreenStateChanged(bool is_fullscreen,
Ahmed Fakhryf1dd847ae2019-03-28 22:15:2141 aura::Window* container) {}
James Cookb0bf8e82017-04-09 17:01:4442
43 // Invoked when |pinned_window| enter or exit pinned mode.
varkha19d7e6c52017-05-25 21:15:3044 virtual void OnPinnedStateChanged(aura::Window* pinned_window) {}
James Cookb0bf8e82017-04-09 17:01:4445
Zach Helfinsteinbbb6bad2018-05-02 18:21:5146 // Called when dictation is activated.
47 virtual void OnDictationStarted() {}
48
49 // Called when dicatation is ended.
50 virtual void OnDictationEnded() {}
51
James Cookb0bf8e82017-04-09 17:01:4452 // Called at the end of Shell::Init.
53 virtual void OnShellInitialized() {}
54
Andrew Xu26c049d12019-02-07 20:04:3055 // Called at the beginning of ~Shell.
56 virtual void OnShellDestroying() {}
57
Scott Violet17a61722017-06-19 17:54:3158 // 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 Violet63f2cf092017-06-09 15:09:5261
James Cookb0bf8e82017-04-09 17:01:4462 protected:
63 virtual ~ShellObserver() {}
64};
65
66} // namespace ash
67
68#endif // ASH_SHELL_OBSERVER_H_