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

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

Issue 2442303002: Adding new media controls to MediaNotification (Closed)
Patch Set: 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 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 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 } 3794 }
3795 } 3795 }
3796 3796
3797 void WebContentsImpl::OnMediaSessionMetadataChanged() { 3797 void WebContentsImpl::OnMediaSessionMetadataChanged() {
3798 MediaSession* session = MediaSession::Get(this); 3798 MediaSession* session = MediaSession::Get(this);
3799 for (auto& observer : observers_) { 3799 for (auto& observer : observers_) {
3800 observer.MediaSessionMetadataChanged(session->metadata()); 3800 observer.MediaSessionMetadataChanged(session->metadata());
3801 } 3801 }
3802 } 3802 }
3803 3803
3804 void WebContentsImpl::OnMediaSessionEnabledAction(
3805 blink::mojom::MediaSessionAction action) {
3806 for (auto& observer : observers_) {
3807 observer.MediaSessionEnabledAction(action);
3808 }
3809 }
3810
3811 void WebContentsImpl::OnMediaSessionDisabledAction(
3812 blink::mojom::MediaSessionAction action) {
3813 for (auto& observer : observers_) {
3814 observer.MediaSessionDisabledAction(action);
3815 }
3816 }
3817
3804 void WebContentsImpl::ResumeMediaSession() { 3818 void WebContentsImpl::ResumeMediaSession() {
3805 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); 3819 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
3806 } 3820 }
3807 3821
3808 void WebContentsImpl::SuspendMediaSession() { 3822 void WebContentsImpl::SuspendMediaSession() {
3809 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); 3823 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
3810 } 3824 }
3811 3825
3812 void WebContentsImpl::StopMediaSession() { 3826 void WebContentsImpl::StopMediaSession() {
3813 MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI); 3827 MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI);
3814 } 3828 }
3815 3829
3830 void WebContentsImpl::DidReceiveMediaSessionAction(
3831 blink::mojom::MediaSessionAction action) {
3832 MediaSession::Get(this)->DidReceiveAction(action);
3833 }
3834
3816 void WebContentsImpl::OnPasswordInputShownOnHttp() { 3835 void WebContentsImpl::OnPasswordInputShownOnHttp() {
3817 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); 3836 controller_.ssl_manager()->DidShowPasswordInputOnHttp();
3818 } 3837 }
3819 3838
3820 void WebContentsImpl::OnCreditCardInputShownOnHttp() { 3839 void WebContentsImpl::OnCreditCardInputShownOnHttp() {
3821 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); 3840 controller_.ssl_manager()->DidShowCreditCardInputOnHttp();
3822 } 3841 }
3823 3842
3824 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) { 3843 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) {
3825 is_overlay_content_ = is_overlay_content; 3844 is_overlay_content_ = is_overlay_content;
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
5204 dialog_manager_ = dialog_manager; 5223 dialog_manager_ = dialog_manager;
5205 } 5224 }
5206 5225
5207 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5226 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5208 auto it = binding_sets_.find(interface_name); 5227 auto it = binding_sets_.find(interface_name);
5209 if (it != binding_sets_.end()) 5228 if (it != binding_sets_.end())
5210 binding_sets_.erase(it); 5229 binding_sets_.erase(it);
5211 } 5230 }
5212 5231
5213 } // namespace content 5232 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698