shell_observer.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #ifndef ASH_SHELL_OBSERVER_H_
  5. #define ASH_SHELL_OBSERVER_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/login_status.h"
  8. #include "ash/public/cpp/shelf_types.h"
  9. namespace aura {
  10. class Window;
  11. }
  12. namespace ash {
  13. class ASH_EXPORT ShellObserver {
  14. public:
  15. // Called when a casting session is started or stopped.
  16. virtual void OnCastingSessionStartedOrStopped(bool started) {}
  17. // Invoked after a non-primary root window is created.
  18. virtual void OnRootWindowAdded(aura::Window* root_window) {}
  19. // Invoked when a root window is about to be shutdown.
  20. virtual void OnRootWindowWillShutdown(aura::Window* root_window) {}
  21. // Invoked when the shelf alignment in |root_window| is changed.
  22. virtual void OnShelfAlignmentChanged(aura::Window* root_window,
  23. ShelfAlignment old_alignment) {}
  24. // Invoked when user work area insets (accessibility panel, docked magnifier,
  25. // keyboard) in |root_window| changed.
  26. // This notification is not fired when shelf bounds changed.
  27. virtual void OnUserWorkAreaInsetsChanged(aura::Window* root_window) {}
  28. // Invoked when entering or exiting fullscreen mode in |container|.
  29. // |container| is always the active desk container.
  30. virtual void OnFullscreenStateChanged(bool is_fullscreen,
  31. aura::Window* container) {}
  32. // Invoked when |pinned_window| enter or exit pinned mode.
  33. virtual void OnPinnedStateChanged(aura::Window* pinned_window) {}
  34. // Called when dictation is activated.
  35. virtual void OnDictationStarted() {}
  36. // Called when dicatation is ended.
  37. virtual void OnDictationEnded() {}
  38. // Called at the end of Shell::Init.
  39. virtual void OnShellInitialized() {}
  40. // Called at the beginning of ~Shell.
  41. virtual void OnShellDestroying() {}
  42. // Called near the end of ~Shell. Shell::Get() still returns the Shell, but
  43. // most of Shell's state has been deleted.
  44. virtual void OnShellDestroyed() {}
  45. protected:
  46. virtual ~ShellObserver() {}
  47. };
  48. } // namespace ash
  49. #endif // ASH_SHELL_OBSERVER_H_