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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2411723002: Split MediaSessionStateChanged() and MediaSessionMetadataChanged() (Closed)
Patch Set: rebased and addressed Anton's comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3831 matching lines...) Expand 10 before | Expand all | Expand 10 after
3842 return; 3842 return;
3843 3843
3844 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3844 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3845 DidUpdateFaviconURL(candidates)); 3845 DidUpdateFaviconURL(candidates));
3846 } 3846 }
3847 3847
3848 void WebContentsImpl::OnMediaSessionStateChanged() { 3848 void WebContentsImpl::OnMediaSessionStateChanged() {
3849 MediaSession* session = MediaSession::Get(this); 3849 MediaSession* session = MediaSession::Get(this);
3850 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3850 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3851 MediaSessionStateChanged(session->IsControllable(), 3851 MediaSessionStateChanged(session->IsControllable(),
3852 session->IsSuspended(), 3852 session->IsSuspended()));
3853 session->metadata())); 3853 }
3854
3855 void WebContentsImpl::OnMediaSessionMetadataChanged() {
3856 MediaSession* session = MediaSession::Get(this);
3857 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3858 MediaSessionMetadataChanged(session->metadata()));
3854 } 3859 }
3855 3860
3856 void WebContentsImpl::ResumeMediaSession() { 3861 void WebContentsImpl::ResumeMediaSession() {
3857 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); 3862 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
3858 } 3863 }
3859 3864
3860 void WebContentsImpl::SuspendMediaSession() { 3865 void WebContentsImpl::SuspendMediaSession() {
3861 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); 3866 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
3862 } 3867 }
3863 3868
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
5278 dialog_manager_ = dialog_manager; 5283 dialog_manager_ = dialog_manager;
5279 } 5284 }
5280 5285
5281 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5286 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5282 auto it = binding_sets_.find(interface_name); 5287 auto it = binding_sets_.find(interface_name);
5283 if (it != binding_sets_.end()) 5288 if (it != binding_sets_.end())
5284 binding_sets_.erase(it); 5289 binding_sets_.erase(it);
5285 } 5290 }
5286 5291
5287 } // namespace content 5292 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698