Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Unified Diff: content/browser/media/session/media_session.h

Issue 1819113002: [MediaSession, Android] Adding visibility tests for MediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable tests for desktop Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 2553c6d7885d58e9b1159201568cdb02d7f9256d..c1759686a75c4c0438891d342246da8fc7105b17 100644
--- a/content/browser/media/session/media_session.h
+++ b/content/browser/media/session/media_session.h
@@ -53,6 +53,12 @@ class MediaSession : public WebContentsObserver,
CONTENT,
};
+ 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);
@@ -120,6 +126,8 @@ class MediaSession : public WebContentsObserver,
// Returns if the session is currently suspended or inactive.
CONTENT_EXPORT bool IsSuspended() const;
+ CONTENT_EXPORT State audio_focus_state_for_test() const;
mlamouri (slow - plz ping) 2016/03/23 15:10:15 Could you make MediaSessionIntegrationBrowserTestB
Zhiqiang Zhang (Slow) 2016/03/24 18:16:49 Done.
+
private:
friend class content::WebContentsUserData<MediaSession>;
friend class ::MediaSessionBrowserTest;
@@ -131,12 +139,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);

Powered by Google App Engine
This is Rietveld 408576698