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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "content/browser/frame_host/render_frame_host_impl.h" | 53 #include "content/browser/frame_host/render_frame_host_impl.h" |
54 #include "content/browser/frame_host/render_frame_proxy_host.h" | 54 #include "content/browser/frame_host/render_frame_proxy_host.h" |
55 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 55 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
56 #include "content/browser/host_zoom_map_impl.h" | 56 #include "content/browser/host_zoom_map_impl.h" |
57 #include "content/browser/loader/loader_io_thread_notifier.h" | 57 #include "content/browser/loader/loader_io_thread_notifier.h" |
58 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 58 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
59 #include "content/browser/manifest/manifest_manager_host.h" | 59 #include "content/browser/manifest/manifest_manager_host.h" |
60 #include "content/browser/media/audio_stream_monitor.h" | 60 #include "content/browser/media/audio_stream_monitor.h" |
61 #include "content/browser/media/capture/web_contents_audio_muter.h" | 61 #include "content/browser/media/capture/web_contents_audio_muter.h" |
62 #include "content/browser/media/media_web_contents_observer.h" | 62 #include "content/browser/media/media_web_contents_observer.h" |
63 #include "content/browser/media/session/media_session.h" | |
64 #include "content/browser/message_port_message_filter.h" | 63 #include "content/browser/message_port_message_filter.h" |
65 #include "content/browser/plugin_content_origin_whitelist.h" | 64 #include "content/browser/plugin_content_origin_whitelist.h" |
66 #include "content/browser/renderer_host/render_process_host_impl.h" | 65 #include "content/browser/renderer_host/render_process_host_impl.h" |
67 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 66 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
68 #include "content/browser/renderer_host/render_view_host_impl.h" | 67 #include "content/browser/renderer_host/render_view_host_impl.h" |
69 #include "content/browser/renderer_host/render_widget_host_impl.h" | 68 #include "content/browser/renderer_host/render_widget_host_impl.h" |
70 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 69 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
71 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 70 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
72 #include "content/browser/renderer_host/text_input_manager.h" | 71 #include "content/browser/renderer_host/text_input_manager.h" |
73 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" | 72 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" |
(...skipping 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3771 // for the new page has committed. | 3770 // for the new page has committed. |
3772 RenderViewHostImpl* rvhi = | 3771 RenderViewHostImpl* rvhi = |
3773 static_cast<RenderViewHostImpl*>(render_view_message_source_); | 3772 static_cast<RenderViewHostImpl*>(render_view_message_source_); |
3774 if (!rvhi->is_active()) | 3773 if (!rvhi->is_active()) |
3775 return; | 3774 return; |
3776 | 3775 |
3777 for (auto& observer : observers_) | 3776 for (auto& observer : observers_) |
3778 observer.DidUpdateFaviconURL(candidates); | 3777 observer.DidUpdateFaviconURL(candidates); |
3779 } | 3778 } |
3780 | 3779 |
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() { | 3780 void WebContentsImpl::OnPasswordInputShownOnHttp() { |
3809 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); | 3781 controller_.ssl_manager()->DidShowPasswordInputOnHttp(); |
3810 } | 3782 } |
3811 | 3783 |
3812 void WebContentsImpl::OnCreditCardInputShownOnHttp() { | 3784 void WebContentsImpl::OnCreditCardInputShownOnHttp() { |
3813 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); | 3785 controller_.ssl_manager()->DidShowCreditCardInputOnHttp(); |
3814 } | 3786 } |
3815 | 3787 |
3816 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { | 3788 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { |
3817 for (auto& observer : observers_) | 3789 for (auto& observer : observers_) |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5188 dialog_manager_ = dialog_manager; | 5160 dialog_manager_ = dialog_manager; |
5189 } | 5161 } |
5190 | 5162 |
5191 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5163 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
5192 auto it = binding_sets_.find(interface_name); | 5164 auto it = binding_sets_.find(interface_name); |
5193 if (it != binding_sets_.end()) | 5165 if (it != binding_sets_.end()) |
5194 binding_sets_.erase(it); | 5166 binding_sets_.erase(it); |
5195 } | 5167 } |
5196 | 5168 |
5197 } // namespace content | 5169 } // namespace content |
OLD | NEW |