| OLD | NEW |
| 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 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3796 // for the new page has committed. | 3796 // for the new page has committed. |
| 3797 RenderViewHostImpl* rvhi = | 3797 RenderViewHostImpl* rvhi = |
| 3798 static_cast<RenderViewHostImpl*>(render_view_message_source_); | 3798 static_cast<RenderViewHostImpl*>(render_view_message_source_); |
| 3799 if (!rvhi->is_active()) | 3799 if (!rvhi->is_active()) |
| 3800 return; | 3800 return; |
| 3801 | 3801 |
| 3802 for (auto& observer : observers_) | 3802 for (auto& observer : observers_) |
| 3803 observer.DidUpdateFaviconURL(candidates); | 3803 observer.DidUpdateFaviconURL(candidates); |
| 3804 } | 3804 } |
| 3805 | 3805 |
| 3806 void WebContentsImpl::OnMediaSessionStateChanged() { | |
| 3807 MediaSessionImpl* session = MediaSessionImpl::Get(this); | |
| 3808 for (auto& observer : observers_) { | |
| 3809 observer.MediaSessionStateChanged(session->IsControllable(), | |
| 3810 session->IsSuspended()); | |
| 3811 } | |
| 3812 } | |
| 3813 | |
| 3814 void WebContentsImpl::OnMediaSessionMetadataChanged() { | |
| 3815 MediaSessionImpl* session = MediaSessionImpl::Get(this); | |
| 3816 for (auto& observer : observers_) { | |
| 3817 observer.MediaSessionMetadataChanged(session->metadata()); | |
| 3818 } | |
| 3819 } | |
| 3820 | |
| 3821 void WebContentsImpl::ResumeMediaSession() { | |
| 3822 MediaSessionImpl::Get(this)->Resume(MediaSession::SuspendType::UI); | |
| 3823 } | |
| 3824 | |
| 3825 void WebContentsImpl::SuspendMediaSession() { | |
| 3826 MediaSessionImpl::Get(this)->Suspend(MediaSession::SuspendType::UI); | |
| 3827 } | |
| 3828 | |
| 3829 void WebContentsImpl::StopMediaSession() { | |
| 3830 MediaSessionImpl::Get(this)->Stop(MediaSession::SuspendType::UI); | |
| 3831 } | |
| 3832 | |
| 3833 void WebContentsImpl::OnPasswordInputShownOnHttp() { | 3806 void WebContentsImpl::OnPasswordInputShownOnHttp() { |
| 3834 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); | 3807 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); |
| 3835 } | 3808 } |
| 3836 | 3809 |
| 3837 void WebContentsImpl::OnCreditCardInputShownOnHttp() { | 3810 void WebContentsImpl::OnCreditCardInputShownOnHttp() { |
| 3838 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); | 3811 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); |
| 3839 } | 3812 } |
| 3840 | 3813 |
| 3841 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) { | 3814 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) { |
| 3842 is_overlay_content_ = is_overlay_content; | 3815 is_overlay_content_ = is_overlay_content; |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5208 dialog_manager_ = dialog_manager; | 5181 dialog_manager_ = dialog_manager; |
| 5209 } | 5182 } |
| 5210 | 5183 |
| 5211 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5184 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5212 auto it = binding_sets_.find(interface_name); | 5185 auto it = binding_sets_.find(interface_name); |
| 5213 if (it != binding_sets_.end()) | 5186 if (it != binding_sets_.end()) |
| 5214 binding_sets_.erase(it); | 5187 binding_sets_.erase(it); |
| 5215 } | 5188 } |
| 5216 | 5189 |
| 5217 } // namespace content | 5190 } // namespace content |
| OLD | NEW |