media_client.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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_MEDIA_CLIENT_H_
  5. #define ASH_PUBLIC_CPP_MEDIA_CLIENT_H_
  6. #include "ash/public/cpp/ash_public_export.h"
  7. namespace ash {
  8. // This delegate allows the UI code in ash to forward UI commands.
  9. class ASH_PUBLIC_EXPORT MediaClient {
  10. public:
  11. // Handles the Next Track Media shortcut key.
  12. virtual void HandleMediaNextTrack() = 0;
  13. // Handles the Play/Pause Toggle Media shortcut key.
  14. virtual void HandleMediaPlayPause() = 0;
  15. // Handles the Play Media shortcut key.
  16. virtual void HandleMediaPlay() = 0;
  17. // Handles the Pause Media shortcut key.
  18. virtual void HandleMediaPause() = 0;
  19. // Handles the Stop Media shortcut key.
  20. virtual void HandleMediaStop() = 0;
  21. // Handles the Previous Track Media shortcut key.
  22. virtual void HandleMediaPrevTrack() = 0;
  23. // Handles the Seek Backward Media shortcut key.
  24. virtual void HandleMediaSeekBackward() = 0;
  25. // Handles the Seek Forward Media shortcut key.
  26. virtual void HandleMediaSeekForward() = 0;
  27. // Requests that the client resends the NotifyMediaCaptureChanged() message.
  28. virtual void RequestCaptureState() = 0;
  29. // Suspends all WebContents-associated media sessions to stop managed players.
  30. virtual void SuspendMediaSessions() = 0;
  31. protected:
  32. virtual ~MediaClient() = default;
  33. };
  34. } // namespace ash
  35. #endif // ASH_PUBLIC_CPP_MEDIA_CLIENT_H_