media_notification_container.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 COMPONENTS_MEDIA_MESSAGE_CENTER_MEDIA_NOTIFICATION_CONTAINER_H_
  5. #define COMPONENTS_MEDIA_MESSAGE_CENTER_MEDIA_NOTIFICATION_CONTAINER_H_
  6. #include "base/component_export.h"
  7. #include "base/containers/flat_set.h"
  8. #include "services/media_session/public/mojom/media_session.mojom.h"
  9. namespace gfx {
  10. class ImageSkia;
  11. } // namespace gfx
  12. namespace media_message_center {
  13. // MediaNotificationContainer is an interface for containers of
  14. // MediaNotificationView components to receive events from the
  15. // MediaNotificationView.
  16. class COMPONENT_EXPORT(MEDIA_MESSAGE_CENTER) MediaNotificationContainer {
  17. public:
  18. // Called when MediaNotificationView's expanded state changes.
  19. virtual void OnExpanded(bool expanded) = 0;
  20. // Called when the MediaSessionInfo changes.
  21. virtual void OnMediaSessionInfoChanged(
  22. const media_session::mojom::MediaSessionInfoPtr& session_info) = 0;
  23. // Called when the metadata changes.
  24. virtual void OnMediaSessionMetadataChanged(
  25. const media_session::MediaMetadata& metadata) = 0;
  26. // Called when the set of visible MediaSessionActions changes.
  27. virtual void OnVisibleActionsChanged(
  28. const base::flat_set<media_session::mojom::MediaSessionAction>&
  29. actions) = 0;
  30. // Called when the media artwork changes.
  31. virtual void OnMediaArtworkChanged(const gfx::ImageSkia& image) = 0;
  32. // Called when MediaNotificationView's colors change.
  33. virtual void OnColorsChanged(SkColor foreground,
  34. SkColor foreground_disabled,
  35. SkColor background) = 0;
  36. // Called when the header row is clicked.
  37. virtual void OnHeaderClicked() = 0;
  38. protected:
  39. virtual ~MediaNotificationContainer() = default;
  40. };
  41. } // namespace media_message_center
  42. #endif // COMPONENTS_MEDIA_MESSAGE_CENTER_MEDIA_NOTIFICATION_CONTAINER_H_