| 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 1cb78315bc5f4bd4e9a05600e55c6c9a5f085094..e41611835a3187a906ccc6ab8b6b5f598b29e0a2 100644
|
| --- a/content/browser/media/session/media_session.h
|
| +++ b/content/browser/media/session/media_session.h
|
| @@ -58,6 +58,13 @@ class MediaSession : public WebContentsObserver,
|
| CONTENT,
|
| };
|
|
|
| + // Only visible to tests.
|
| + enum class State {
|
| + ACTIVE,
|
| + SUSPENDED,
|
| + INACTIVE
|
| + };
|
| +
|
| // Returns the MediaSession associated to this WebContents. Creates one if
|
| // none is currently available.
|
| CONTENT_EXPORT static MediaSession* Get(WebContents* web_contents);
|
| @@ -129,6 +136,8 @@ class MediaSession : public WebContentsObserver,
|
| // Returns if the session is currently suspended or inactive.
|
| CONTENT_EXPORT bool IsSuspended() const;
|
|
|
| + bool HasPepper() const;
|
| +
|
| private:
|
| friend class content::WebContentsUserData<MediaSession>;
|
| friend class ::MediaSessionBrowserTest;
|
| @@ -144,12 +153,6 @@ class MediaSession : public WebContentsObserver,
|
| CONTENT_EXPORT void RemoveAllPlayersForTest();
|
| CONTENT_EXPORT MediaSessionUmaHelper* uma_helper_for_test();
|
|
|
| - enum class State {
|
| - ACTIVE,
|
| - SUSPENDED,
|
| - INACTIVE
|
| - };
|
| -
|
| // Representation of a player for the MediaSession.
|
| struct PlayerIdentifier {
|
| PlayerIdentifier(MediaSessionObserver* observer, int player_id);
|
| @@ -205,8 +208,12 @@ class MediaSession : public WebContentsObserver,
|
| RegisterMediaSessionStateChangedCallbackForTest(
|
| const StateChangedCallback& cb);
|
|
|
| + CONTENT_EXPORT bool AddPepperPlayer(MediaSessionObserver* observer,
|
| + int player_id);
|
| +
|
| std::unique_ptr<MediaSessionDelegate> delegate_;
|
| PlayersMap players_;
|
| + PlayersMap pepper_players_;
|
|
|
| State audio_focus_state_;
|
| SuspendType suspend_type_;
|
|
|