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

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

Issue 2475473002: Implement one-shot audio focus inside MediaSession (Closed)
Patch Set: fixed a case where removing the last one-shot player Created 4 years, 1 month 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
« no previous file with comments | « no previous file | content/browser/media/session/media_session_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4e07dad8d06f22ba0f6b45f03c7fbda3b2a6093f..1f1a0fc85d172fd45655d48251e7ee86ac05bae3 100644
--- a/content/browser/media/session/media_session_impl.h
+++ b/content/browser/media/session/media_session_impl.h
@@ -226,8 +226,8 @@ class MediaSessionImpl : public MediaSession,
// delegate to abandon the audio focus.
CONTENT_EXPORT void AbandonSystemAudioFocusIfNeeded();
- // Notifies WebContents about the state change of the media session.
- void UpdateWebContents();
+ // Notifies observers about the state change of the media session.
+ void NotifyAboutStateChange();
// Internal method that should be used instead of setting audio_focus_state_.
// It sets audio_focus_state_ and notifies observers about the state change.
@@ -248,9 +248,13 @@ class MediaSessionImpl : public MediaSession,
CONTENT_EXPORT bool AddPepperPlayer(MediaSessionPlayerObserver* observer,
int player_id);
+ CONTENT_EXPORT bool AddOneShotPlayer(MediaSessionPlayerObserver* observer,
+ int player_id);
+
std::unique_ptr<AudioFocusDelegate> delegate_;
- PlayersMap players_;
+ PlayersMap normal_players_;
PlayersMap pepper_players_;
+ PlayersMap one_shot_players_;
State audio_focus_state_;
MediaSession::SuspendType suspend_type_;
« no previous file with comments | « no previous file | content/browser/media/session/media_session_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698