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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #include "content/browser/profiler_message_filter.h" | 66 #include "content/browser/profiler_message_filter.h" |
67 #include "content/browser/renderer_host/clipboard_message_filter.h" | 67 #include "content/browser/renderer_host/clipboard_message_filter.h" |
68 #include "content/browser/renderer_host/database_message_filter.h" | 68 #include "content/browser/renderer_host/database_message_filter.h" |
69 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 69 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
70 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 70 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
71 #include "content/browser/renderer_host/gpu_message_filter.h" | 71 #include "content/browser/renderer_host/gpu_message_filter.h" |
72 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 72 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
73 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" | 73 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" |
74 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 74 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
75 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 75 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
76 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | |
77 #include "content/browser/renderer_host/media/video_capture_host.h" | 76 #include "content/browser/renderer_host/media/video_capture_host.h" |
78 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" | 77 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" |
79 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" | 78 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
80 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 79 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
81 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 80 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
82 #include "content/browser/renderer_host/quota_dispatcher_host.h" | 81 #include "content/browser/renderer_host/quota_dispatcher_host.h" |
83 #include "content/browser/renderer_host/render_message_filter.h" | 82 #include "content/browser/renderer_host/render_message_filter.h" |
84 #include "content/browser/renderer_host/render_view_host_delegate.h" | 83 #include "content/browser/renderer_host/render_view_host_delegate.h" |
85 #include "content/browser/renderer_host/render_view_host_impl.h" | 84 #include "content/browser/renderer_host/render_view_host_impl.h" |
86 #include "content/browser/renderer_host/render_widget_helper.h" | 85 #include "content/browser/renderer_host/render_widget_helper.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 #include "webkit/glue/resource_type.h" | 128 #include "webkit/glue/resource_type.h" |
130 #include "webkit/plugins/plugin_switches.h" | 129 #include "webkit/plugins/plugin_switches.h" |
131 | 130 |
132 #if defined(OS_WIN) | 131 #if defined(OS_WIN) |
133 #include "base/win/scoped_com_initializer.h" | 132 #include "base/win/scoped_com_initializer.h" |
134 #include "content/common/font_cache_dispatcher_win.h" | 133 #include "content/common/font_cache_dispatcher_win.h" |
135 #include "content/common/sandbox_win.h" | 134 #include "content/common/sandbox_win.h" |
136 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 135 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
137 #endif | 136 #endif |
138 | 137 |
| 138 #if defined(ENABLE_WEBRTC) |
| 139 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 140 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
| 141 #endif |
| 142 |
139 #include "third_party/skia/include/core/SkBitmap.h" | 143 #include "third_party/skia/include/core/SkBitmap.h" |
140 | 144 |
141 extern bool g_exited_main_message_loop; | 145 extern bool g_exited_main_message_loop; |
142 | 146 |
143 static const char* kSiteProcessMapKeyName = "content_site_process_map"; | 147 static const char* kSiteProcessMapKeyName = "content_site_process_map"; |
144 | 148 |
145 namespace content { | 149 namespace content { |
146 namespace { | 150 namespace { |
147 | 151 |
148 base::MessageLoop* g_in_process_thread; | 152 base::MessageLoop* g_in_process_thread; |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 } | 639 } |
636 channel_->AddFilter(GeolocationDispatcherHost::New( | 640 channel_->AddFilter(GeolocationDispatcherHost::New( |
637 GetID(), g_browser_plugin_geolocation_context.Get().get())); | 641 GetID(), g_browser_plugin_geolocation_context.Get().get())); |
638 } else { | 642 } else { |
639 channel_->AddFilter(GeolocationDispatcherHost::New( | 643 channel_->AddFilter(GeolocationDispatcherHost::New( |
640 GetID(), browser_context->GetGeolocationPermissionContext())); | 644 GetID(), browser_context->GetGeolocationPermissionContext())); |
641 } | 645 } |
642 gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get()); | 646 gpu_message_filter_ = new GpuMessageFilter(GetID(), widget_helper_.get()); |
643 channel_->AddFilter(gpu_message_filter_); | 647 channel_->AddFilter(gpu_message_filter_); |
644 #if defined(ENABLE_WEBRTC) | 648 #if defined(ENABLE_WEBRTC) |
| 649 channel_->AddFilter(new WebRTCIdentityServiceHost( |
| 650 storage_partition_impl_->GetWebRTCIdentityStore())); |
645 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); | 651 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); |
646 channel_->AddFilter(peer_connection_tracker_host_.get()); | 652 channel_->AddFilter(peer_connection_tracker_host_.get()); |
647 channel_->AddFilter(new MediaStreamDispatcherHost(GetID())); | 653 channel_->AddFilter(new MediaStreamDispatcherHost(GetID())); |
648 #endif | 654 #endif |
649 #if defined(ENABLE_PLUGINS) | 655 #if defined(ENABLE_PLUGINS) |
650 // TODO(raymes): PepperMessageFilter should be removed from here. | 656 // TODO(raymes): PepperMessageFilter should be removed from here. |
651 channel_->AddFilter(new PepperMessageFilter(GetID(), browser_context)); | 657 channel_->AddFilter(new PepperMessageFilter(GetID(), browser_context)); |
652 channel_->AddFilter(new PepperRendererConnection); | 658 channel_->AddFilter(new PepperRendererConnection); |
653 #endif | 659 #endif |
654 #if defined(ENABLE_INPUT_SPEECH) | 660 #if defined(ENABLE_INPUT_SPEECH) |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 continue; | 1807 continue; |
1802 | 1808 |
1803 RenderViewHost* rvh = | 1809 RenderViewHost* rvh = |
1804 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); | 1810 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); |
1805 | 1811 |
1806 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1812 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
1807 } | 1813 } |
1808 } | 1814 } |
1809 | 1815 |
1810 } // namespace content | 1816 } // namespace content |
OLD | NEW |