| Index: content/browser/media/session/media_session.h
|
| diff --git a/content/browser/media/session/media_session.h b/content/browser/media/session/media_session.h
|
| index 9239c7854a18b18326e2c2983451e49490922982..226d7119b852542078630acef27df3b0f4e790dd 100644
|
| --- a/content/browser/media/session/media_session.h
|
| +++ b/content/browser/media/session/media_session.h
|
| @@ -20,6 +20,12 @@
|
|
|
| class MediaSessionBrowserTest;
|
|
|
| +namespace blink {
|
| +namespace mojom {
|
| +enum class MediaSessionAction;
|
| +} // namespace mojom
|
| +} // namespace blink
|
| +
|
| namespace media {
|
| enum class MediaContentType;
|
| } // namespace media
|
| @@ -29,6 +35,7 @@ namespace content {
|
| class AudioFocusDelegate;
|
| class AudioFocusManagerTest;
|
| class MediaSessionPlayerObserver;
|
| +class MediaSessionServiceImpl;
|
| class MediaSessionStateObserver;
|
| class MediaSessionVisibilityBrowserTest;
|
|
|
| @@ -111,6 +118,17 @@ class MediaSession : public WebContentsObserver,
|
| // |type| represents the origin of the request.
|
| CONTENT_EXPORT void Stop(SuspendType suspend_type);
|
|
|
| + // Called when an action is enabled in blink::MediaSession and notify
|
| + // observers.
|
| + void OnMediaSessionEnabledAction(blink::mojom::MediaSessionAction action);
|
| +
|
| + // Called when an action is disabled in blink::MediaSession and notify
|
| + // observers.
|
| + void OnMediaSessionDisabledAction(blink::mojom::MediaSessionAction action);
|
| +
|
| + // Received a media session action and forward to blink::MediaSession.
|
| + void DidReceiveAction(blink::mojom::MediaSessionAction action);
|
| +
|
| // Let the media session start ducking such that the volume multiplier is
|
| // reduced.
|
| CONTENT_EXPORT void StartDucking();
|
| @@ -148,6 +166,8 @@ class MediaSession : public WebContentsObserver,
|
| // WebContentsObserver implementation
|
| void WebContentsDestroyed() override;
|
|
|
| + void SetMediaSessionService(MediaSessionServiceImpl* service);
|
| +
|
| private:
|
| friend class content::WebContentsUserData<MediaSession>;
|
| friend class ::MediaSessionBrowserTest;
|
| @@ -237,6 +257,10 @@ class MediaSession : public WebContentsObserver,
|
| base::Optional<MediaMetadata> metadata_;
|
| base::CallbackList<void(State)> media_session_state_listeners_;
|
|
|
| + // The MediaSessionService this session is associated with (the service of the
|
| + // top-level frame).
|
| + MediaSessionServiceImpl* service_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MediaSession);
|
| };
|
|
|
|
|