notifier_settings_observer.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2019 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_NOTIFIER_SETTINGS_OBSERVER_H_
  5. #define ASH_PUBLIC_CPP_NOTIFIER_SETTINGS_OBSERVER_H_
  6. #include <vector>
  7. #include "ash/public/cpp/ash_public_export.h"
  8. #include "base/observer_list_types.h"
  9. namespace message_center {
  10. struct NotifierId;
  11. }
  12. namespace gfx {
  13. class ImageSkia;
  14. }
  15. namespace ash {
  16. struct NotifierMetadata;
  17. // An interface used to listen for changes to notifier settings information,
  18. // implemented by any view that displays info about notifiers.
  19. class ASH_PUBLIC_EXPORT NotifierSettingsObserver
  20. : public base::CheckedObserver {
  21. public:
  22. // Sets the user-visible and toggle-able list of notifiers.
  23. virtual void OnNotifiersUpdated(
  24. const std::vector<NotifierMetadata>& notifiers) {}
  25. // Updates an icon for a notifier previously sent via OnNotifierListUpdated.
  26. virtual void OnNotifierIconUpdated(
  27. const message_center::NotifierId& notifier_id,
  28. const gfx::ImageSkia& icon) {}
  29. };
  30. } // namespace ash
  31. #endif // ASH_PUBLIC_CPP_NOTIFIER_SETTINGS_OBSERVER_H_