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

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

Issue 2782053002: MediaSession: Stop observers on MediaSession destruction (Closed)
Patch Set: Rebase 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/media_session_impl.cc
diff --git a/content/browser/media/session/media_session_impl.cc b/content/browser/media/session/media_session_impl.cc
index e2e554653b7c795504b18975930c0d1d8b468722..222701e81c0411222060cc19fb5bc558f55a4d03 100644
--- a/content/browser/media/session/media_session_impl.cc
+++ b/content/browser/media/session/media_session_impl.cc
@@ -93,8 +93,10 @@ MediaSessionImpl::~MediaSessionImpl() {
DCHECK(pepper_players_.empty());
DCHECK(one_shot_players_.empty());
DCHECK(audio_focus_state_ == State::INACTIVE);
- for (auto& observer : observers_)
+ for (auto& observer : observers_) {
observer.MediaSessionDestroyed();
+ observer.StopObserving();
+ }
}
void MediaSessionImpl::WebContentsDestroyed() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698