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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 #include "content/browser/renderer_host/media/video_capture_host.h" | 92 #include "content/browser/renderer_host/media/video_capture_host.h" |
93 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" | 93 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" |
94 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 94 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
95 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 95 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
96 #include "content/browser/renderer_host/render_message_filter.h" | 96 #include "content/browser/renderer_host/render_message_filter.h" |
97 #include "content/browser/renderer_host/render_view_host_delegate.h" | 97 #include "content/browser/renderer_host/render_view_host_delegate.h" |
98 #include "content/browser/renderer_host/render_view_host_impl.h" | 98 #include "content/browser/renderer_host/render_view_host_impl.h" |
99 #include "content/browser/renderer_host/render_widget_helper.h" | 99 #include "content/browser/renderer_host/render_widget_helper.h" |
100 #include "content/browser/renderer_host/render_widget_host_impl.h" | 100 #include "content/browser/renderer_host/render_widget_host_impl.h" |
101 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 101 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| 102 #include "content/browser/renderer_host/vr_message_filter.h" |
102 #include "content/browser/renderer_host/websocket_dispatcher_host.h" | 103 #include "content/browser/renderer_host/websocket_dispatcher_host.h" |
103 #include "content/browser/resolve_proxy_msg_helper.h" | 104 #include "content/browser/resolve_proxy_msg_helper.h" |
104 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 105 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
105 #include "content/browser/service_worker/service_worker_dispatcher_host.h" | 106 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
106 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 107 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
107 #include "content/browser/shared_worker/worker_storage_partition.h" | 108 #include "content/browser/shared_worker/worker_storage_partition.h" |
108 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 109 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
109 #include "content/browser/storage_partition_impl.h" | 110 #include "content/browser/storage_partition_impl.h" |
110 #include "content/browser/streams/stream_context.h" | 111 #include "content/browser/streams/stream_context.h" |
111 #include "content/browser/tracing/trace_message_filter.h" | 112 #include "content/browser/tracing/trace_message_filter.h" |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 storage_partition_impl_->GetGeofencingManager())); | 926 storage_partition_impl_->GetGeofencingManager())); |
926 AddFilter(new NavigatorConnectDispatcherHost( | 927 AddFilter(new NavigatorConnectDispatcherHost( |
927 storage_partition_impl_->GetNavigatorConnectContext(), | 928 storage_partition_impl_->GetNavigatorConnectContext(), |
928 message_port_message_filter_.get())); | 929 message_port_message_filter_.get())); |
929 if (browser_command_line.HasSwitch( | 930 if (browser_command_line.HasSwitch( |
930 switches::kEnableExperimentalWebPlatformFeatures)) { | 931 switches::kEnableExperimentalWebPlatformFeatures)) { |
931 scoped_refptr<BluetoothDispatcherHost> bluetooth_dispatcher_host( | 932 scoped_refptr<BluetoothDispatcherHost> bluetooth_dispatcher_host( |
932 BluetoothDispatcherHost::Create()); | 933 BluetoothDispatcherHost::Create()); |
933 AddFilter(bluetooth_dispatcher_host.get()); | 934 AddFilter(bluetooth_dispatcher_host.get()); |
934 } | 935 } |
| 936 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
| 937 AddFilter(new VRMessageFilter()); |
| 938 } |
935 } | 939 } |
936 | 940 |
937 void RenderProcessHostImpl::RegisterMojoServices() { | 941 void RenderProcessHostImpl::RegisterMojoServices() { |
938 mojo_application_host_->service_registry()->AddService( | 942 mojo_application_host_->service_registry()->AddService( |
939 base::Bind(&device::BatteryMonitorImpl::Create)); | 943 base::Bind(&device::BatteryMonitorImpl::Create)); |
940 | 944 |
941 mojo_application_host_->service_registry()->AddService( | 945 mojo_application_host_->service_registry()->AddService( |
942 base::Bind(&device::VibrationManagerImpl::Create)); | 946 base::Bind(&device::VibrationManagerImpl::Create)); |
943 | 947 |
944 mojo_application_host_->service_registry()->AddService( | 948 mojo_application_host_->service_registry()->AddService( |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 switches::kEnableStrictSiteIsolation, | 1296 switches::kEnableStrictSiteIsolation, |
1293 switches::kEnableThreadedCompositing, | 1297 switches::kEnableThreadedCompositing, |
1294 switches::kEnableTouchDragDrop, | 1298 switches::kEnableTouchDragDrop, |
1295 switches::kEnableTouchEditing, | 1299 switches::kEnableTouchEditing, |
1296 switches::kEnableUnsafeES3APIs, | 1300 switches::kEnableUnsafeES3APIs, |
1297 switches::kEnableViewport, | 1301 switches::kEnableViewport, |
1298 switches::kEnableViewportMeta, | 1302 switches::kEnableViewportMeta, |
1299 switches::kEnableVtune, | 1303 switches::kEnableVtune, |
1300 switches::kEnableWebGLDraftExtensions, | 1304 switches::kEnableWebGLDraftExtensions, |
1301 switches::kEnableWebGLImageChromium, | 1305 switches::kEnableWebGLImageChromium, |
| 1306 switches::kEnableWebVR, |
1302 switches::kExplicitlyAllowedPorts, | 1307 switches::kExplicitlyAllowedPorts, |
1303 switches::kForceDeviceScaleFactor, | 1308 switches::kForceDeviceScaleFactor, |
1304 switches::kForceDisplayList2dCanvas, | 1309 switches::kForceDisplayList2dCanvas, |
1305 switches::kFullMemoryCrashReport, | 1310 switches::kFullMemoryCrashReport, |
1306 switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode, | 1311 switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode, |
1307 switches::kIPCConnectionTimeout, | 1312 switches::kIPCConnectionTimeout, |
1308 switches::kJavaScriptFlags, | 1313 switches::kJavaScriptFlags, |
1309 switches::kLoggingLevel, | 1314 switches::kLoggingLevel, |
1310 switches::kMainFrameResizesAreOrientationChanges, | 1315 switches::kMainFrameResizesAreOrientationChanges, |
1311 switches::kMaxUntiledLayerWidth, | 1316 switches::kMaxUntiledLayerWidth, |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2483 if (worker_ref_count_ == 0) | 2488 if (worker_ref_count_ == 0) |
2484 Cleanup(); | 2489 Cleanup(); |
2485 } | 2490 } |
2486 | 2491 |
2487 void RenderProcessHostImpl::GetAudioOutputControllers( | 2492 void RenderProcessHostImpl::GetAudioOutputControllers( |
2488 const GetAudioOutputControllersCallback& callback) const { | 2493 const GetAudioOutputControllersCallback& callback) const { |
2489 audio_renderer_host()->GetOutputControllers(callback); | 2494 audio_renderer_host()->GetOutputControllers(callback); |
2490 } | 2495 } |
2491 | 2496 |
2492 } // namespace content | 2497 } // namespace content |
OLD | NEW |