system_tray_observer.h 782 B

123456789101112131415161718192021222324252627
  1. // Copyright 2017 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_PUBLIC_CPP_SYSTEM_TRAY_OBSERVER_H_
  5. #define ASH_PUBLIC_CPP_SYSTEM_TRAY_OBSERVER_H_
  6. #include "ash/public/cpp/ash_public_export.h"
  7. namespace ash {
  8. // A class that observes system tray related focus events.
  9. class ASH_PUBLIC_EXPORT SystemTrayObserver {
  10. public:
  11. // Called when focus is about to leave system tray.
  12. virtual void OnFocusLeavingSystemTray(bool reverse) = 0;
  13. // Called when the UnifiedSystemTrayBubble is shown.
  14. virtual void OnSystemTrayBubbleShown() {}
  15. protected:
  16. virtual ~SystemTrayObserver() = default;
  17. };
  18. } // namespace ash
  19. #endif // ASH_PUBLIC_CPP_SYSTEM_TRAY_OBSERVER_H_