| 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 3769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3780 // for the new page has committed. | 3780 // for the new page has committed. |
| 3781 RenderViewHostImpl* rvhi = | 3781 RenderViewHostImpl* rvhi = |
| 3782 static_cast<RenderViewHostImpl*>(render_view_message_source_); | 3782 static_cast<RenderViewHostImpl*>(render_view_message_source_); |
| 3783 if (!rvhi->is_active()) | 3783 if (!rvhi->is_active()) |
| 3784 return; | 3784 return; |
| 3785 | 3785 |
| 3786 for (auto& observer : observers_) | 3786 for (auto& observer : observers_) |
| 3787 observer.DidUpdateFaviconURL(candidates); | 3787 observer.DidUpdateFaviconURL(candidates); |
| 3788 } | 3788 } |
| 3789 | 3789 |
| 3790 void WebContentsImpl::OnMediaSessionStateChanged() { | |
| 3791 MediaSessionImpl* session = MediaSessionImpl::Get(this); | |
| 3792 for (auto& observer : observers_) { | |
| 3793 observer.MediaSessionStateChanged(session->IsControllable(), | |
| 3794 session->IsSuspended()); | |
| 3795 } | |
| 3796 } | |
| 3797 | |
| 3798 void WebContentsImpl::OnMediaSessionMetadataChanged() { | |
| 3799 MediaSessionImpl* session = MediaSessionImpl::Get(this); | |
| 3800 for (auto& observer : observers_) { | |
| 3801 observer.MediaSessionMetadataChanged(session->metadata()); | |
| 3802 } | |
| 3803 } | |
| 3804 | |
| 3805 void WebContentsImpl::ResumeMediaSession() { | |
| 3806 MediaSessionImpl::Get(this)->Resume(MediaSession::SuspendType::UI); | |
| 3807 } | |
| 3808 | |
| 3809 void WebContentsImpl::SuspendMediaSession() { | |
| 3810 MediaSessionImpl::Get(this)->Suspend(MediaSession::SuspendType::UI); | |
| 3811 } | |
| 3812 | |
| 3813 void WebContentsImpl::StopMediaSession() { | |
| 3814 MediaSessionImpl::Get(this)->Stop(MediaSession::SuspendType::UI); | |
| 3815 } | |
| 3816 | |
| 3817 void WebContentsImpl::OnPasswordInputShownOnHttp() { | 3790 void WebContentsImpl::OnPasswordInputShownOnHttp() { |
| 3818 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); | 3791 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); |
| 3819 } | 3792 } |
| 3820 | 3793 |
| 3821 void WebContentsImpl::OnCreditCardInputShownOnHttp() { | 3794 void WebContentsImpl::OnCreditCardInputShownOnHttp() { |
| 3822 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); | 3795 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); |
| 3823 } | 3796 } |
| 3824 | 3797 |
| 3825 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) { | 3798 void WebContentsImpl::SetIsOverlayContent(bool is_overlay_content) { |
| 3826 is_overlay_content_ = is_overlay_content; | 3799 is_overlay_content_ = is_overlay_content; |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5206 dialog_manager_ = dialog_manager; | 5179 dialog_manager_ = dialog_manager; |
| 5207 } | 5180 } |
| 5208 | 5181 |
| 5209 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5182 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5210 auto it = binding_sets_.find(interface_name); | 5183 auto it = binding_sets_.find(interface_name); |
| 5211 if (it != binding_sets_.end()) | 5184 if (it != binding_sets_.end()) |
| 5212 binding_sets_.erase(it); | 5185 binding_sets_.erase(it); |
| 5213 } | 5186 } |
| 5214 | 5187 |
| 5215 } // namespace content | 5188 } // namespace content |
| OLD | NEW |