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

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

Issue 2439483003: Link MediaSessionTabHelper with native MediaSession [CL is going to be split] (Closed)
Patch Set: Super rough, please give some initial feedbacks 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 3760 matching lines...) Expand 10 before | Expand all | Expand 10 after
3771 // for the new page has committed. 3771 // for the new page has committed.
3772 RenderViewHostImpl* rvhi = 3772 RenderViewHostImpl* rvhi =
3773 static_cast<RenderViewHostImpl*>(render_view_message_source_); 3773 static_cast<RenderViewHostImpl*>(render_view_message_source_);
3774 if (!rvhi->is_active()) 3774 if (!rvhi->is_active())
3775 return; 3775 return;
3776 3776
3777 for (auto& observer : observers_) 3777 for (auto& observer : observers_)
3778 observer.DidUpdateFaviconURL(candidates); 3778 observer.DidUpdateFaviconURL(candidates);
3779 } 3779 }
3780 3780
3781 void WebContentsImpl::OnMediaSessionStateChanged() {
3782 MediaSession* session = MediaSession::Get(this);
3783 for (auto& observer : observers_) {
3784 observer.MediaSessionStateChanged(session->IsControllable(),
3785 session->IsSuspended());
3786 }
3787 }
3788
3789 void WebContentsImpl::OnMediaSessionMetadataChanged() {
3790 MediaSession* session = MediaSession::Get(this);
3791 for (auto& observer : observers_) {
3792 observer.MediaSessionMetadataChanged(session->metadata());
3793 }
3794 }
3795
3796 void WebContentsImpl::ResumeMediaSession() {
3797 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
3798 }
3799
3800 void WebContentsImpl::SuspendMediaSession() {
3801 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
3802 }
3803
3804 void WebContentsImpl::StopMediaSession() {
3805 MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI);
3806 }
3807
3808 void WebContentsImpl::OnPasswordInputShownOnHttp() { 3781 void WebContentsImpl::OnPasswordInputShownOnHttp() {
3809 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); 3782 controller_.ssl_manager()->DidShowPasswordInputOnHttp();
3810 } 3783 }
3811 3784
3812 void WebContentsImpl::OnCreditCardInputShownOnHttp() { 3785 void WebContentsImpl::OnCreditCardInputShownOnHttp() {
3813 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); 3786 controller_.ssl_manager()->DidShowCreditCardInputOnHttp();
3814 } 3787 }
3815 3788
3816 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { 3789 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
3817 for (auto& observer : observers_) 3790 for (auto& observer : observers_)
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
5187 dialog_manager_ = dialog_manager; 5160 dialog_manager_ = dialog_manager;
5188 } 5161 }
5189 5162
5190 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5163 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5191 auto it = binding_sets_.find(interface_name); 5164 auto it = binding_sets_.find(interface_name);
5192 if (it != binding_sets_.end()) 5165 if (it != binding_sets_.end())
5193 binding_sets_.erase(it); 5166 binding_sets_.erase(it);
5194 } 5167 }
5195 5168
5196 } // namespace content 5169 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698