Index: content/public/browser/web_contents_observer.h |
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h |
index 704c509ca61dde486397478d641fd8c438bfc1cc..35c17ab1ad34bf74810381b339af5889b7694e63 100644 |
--- a/content/public/browser/web_contents_observer.h |
+++ b/content/public/browser/web_contents_observer.h |
@@ -24,6 +24,12 @@ |
#include "ui/base/page_transition_types.h" |
#include "ui/base/window_open_disposition.h" |
+namespace blink { |
+namespace mojom { |
+enum class MediaSessionAction; |
+} |
+} |
+ |
namespace content { |
class NavigationEntry; |
@@ -468,6 +474,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, |
virtual void MediaStartedPlaying(const MediaPlayerId& id) {} |
virtual void MediaStoppedPlaying(const MediaPlayerId& id) {} |
+ // TODO(zqzhang): Decouple MediaSession messages from WebContents to avoid |
+ // plumbing. See https://crbug.com/658678 |
+ |
// Invoked when media session has changed its state. |
virtual void MediaSessionStateChanged(bool is_controllable, |
bool is_suspended) {} |
@@ -477,6 +486,14 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, |
virtual void MediaSessionMetadataChanged( |
const base::Optional<MediaMetadata>& metadata) {} |
+ // Invoked when media session action is enabled. |
+ virtual void MediaSessionEnabledAction( |
+ blink::mojom::MediaSessionAction action) {} |
+ |
+ // Invoked when media session action is disabled. |
+ virtual void MediaSessionDisabledAction( |
+ blink::mojom::MediaSessionAction action) {} |
+ |
// Invoked when the renderer process changes the page scale factor. |
virtual void OnPageScaleFactorChanged(float page_scale_factor) {} |