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

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

Issue 2758773003: Clean up MediaSessionImpl state interfaces (Closed)
Patch Set: Created 3 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_impl.h
diff --git a/content/browser/media/session/media_session_impl.h b/content/browser/media/session/media_session_impl.h
index f95ffba1f368fcd5ac96f1d8538f892c50b31be4..71784adacfe3593a908d0c261b933c7c0a4e17a3 100644
--- a/content/browser/media/session/media_session_impl.h
+++ b/content/browser/media/session/media_session_impl.h
@@ -147,15 +147,16 @@ class MediaSessionImpl : public MediaSession,
CONTENT_EXPORT bool IsActive() const;
// Returns if the session is currently suspended.
- // TODO(mlamouri): IsSuspended() below checks if the state is not ACTIVE
- // instead of checking if the state is SUSPENDED. In order to not have to
- // change all the callers and make the current refactoring ridiculously huge,
- // this method is introduced temporarily and will be removed later.
- CONTENT_EXPORT bool IsReallySuspended() const;
-
- // Returns if the session is currently suspended or inactive.
CONTENT_EXPORT bool IsSuspended() const;
+ // Returns if the session is actually paused, which is the combined result of
+ // |IsSuspended()| and the declared playback state of the routed service. This
+ // state should be used in the UI end
+ //
+ // TODO(zqzhang): Maybe also compute for IsControllable()? See
+ // https://crbug.com/674983.
+ CONTENT_EXPORT bool IsActuallyPaused() const;
+
// Returns the audio focus type. The type is updated everytime after the
// session requests audio focus.
CONTENT_EXPORT AudioFocusManager::AudioFocusType audio_focus_type() const {
@@ -205,7 +206,6 @@ class MediaSessionImpl : public MediaSession,
CONTENT_EXPORT void SetDelegateForTests(
std::unique_ptr<AudioFocusDelegate> delegate);
- CONTENT_EXPORT bool IsActiveForTest() const;
CONTENT_EXPORT void RemoveAllPlayersForTest();
CONTENT_EXPORT MediaSessionUmaHelper* uma_helper_for_test();

Powered by Google App Engine
This is Rietveld 408576698