| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 91 #include "content/browser/renderer_host/media/video_capture_host.h" | 91 #include "content/browser/renderer_host/media/video_capture_host.h" | 
| 92 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" | 92 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" | 
| 93 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 93 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 
| 94 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 94 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 
| 95 #include "content/browser/renderer_host/render_message_filter.h" | 95 #include "content/browser/renderer_host/render_message_filter.h" | 
| 96 #include "content/browser/renderer_host/render_view_host_delegate.h" | 96 #include "content/browser/renderer_host/render_view_host_delegate.h" | 
| 97 #include "content/browser/renderer_host/render_view_host_impl.h" | 97 #include "content/browser/renderer_host/render_view_host_impl.h" | 
| 98 #include "content/browser/renderer_host/render_widget_helper.h" | 98 #include "content/browser/renderer_host/render_widget_helper.h" | 
| 99 #include "content/browser/renderer_host/render_widget_host_impl.h" | 99 #include "content/browser/renderer_host/render_widget_host_impl.h" | 
| 100 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 100 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 
|  | 101 #include "content/browser/renderer_host/vr_message_filter.h" | 
| 101 #include "content/browser/renderer_host/websocket_dispatcher_host.h" | 102 #include "content/browser/renderer_host/websocket_dispatcher_host.h" | 
| 102 #include "content/browser/resolve_proxy_msg_helper.h" | 103 #include "content/browser/resolve_proxy_msg_helper.h" | 
| 103 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 104 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 
| 104 #include "content/browser/service_worker/service_worker_dispatcher_host.h" | 105 #include "content/browser/service_worker/service_worker_dispatcher_host.h" | 
| 105 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 106 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 
| 106 #include "content/browser/shared_worker/worker_storage_partition.h" | 107 #include "content/browser/shared_worker/worker_storage_partition.h" | 
| 107 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 108 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 
| 108 #include "content/browser/storage_partition_impl.h" | 109 #include "content/browser/storage_partition_impl.h" | 
| 109 #include "content/browser/streams/stream_context.h" | 110 #include "content/browser/streams/stream_context.h" | 
| 110 #include "content/browser/tracing/trace_message_filter.h" | 111 #include "content/browser/tracing/trace_message_filter.h" | 
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 924       storage_partition_impl_->GetGeofencingManager())); | 925       storage_partition_impl_->GetGeofencingManager())); | 
| 925   AddFilter(new NavigatorConnectDispatcherHost( | 926   AddFilter(new NavigatorConnectDispatcherHost( | 
| 926       storage_partition_impl_->GetNavigatorConnectContext(), | 927       storage_partition_impl_->GetNavigatorConnectContext(), | 
| 927       message_port_message_filter_.get())); | 928       message_port_message_filter_.get())); | 
| 928   if (browser_command_line.HasSwitch( | 929   if (browser_command_line.HasSwitch( | 
| 929           switches::kEnableExperimentalWebPlatformFeatures)) { | 930           switches::kEnableExperimentalWebPlatformFeatures)) { | 
| 930     scoped_refptr<BluetoothDispatcherHost> bluetooth_dispatcher_host( | 931     scoped_refptr<BluetoothDispatcherHost> bluetooth_dispatcher_host( | 
| 931         BluetoothDispatcherHost::Create()); | 932         BluetoothDispatcherHost::Create()); | 
| 932     AddFilter(bluetooth_dispatcher_host.get()); | 933     AddFilter(bluetooth_dispatcher_host.get()); | 
| 933   } | 934   } | 
|  | 935   if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 
|  | 936     AddFilter(new VRMessageFilter()); | 
|  | 937   } | 
| 934 } | 938 } | 
| 935 | 939 | 
| 936 void RenderProcessHostImpl::RegisterMojoServices() { | 940 void RenderProcessHostImpl::RegisterMojoServices() { | 
| 937   mojo_application_host_->service_registry()->AddService( | 941   mojo_application_host_->service_registry()->AddService( | 
| 938       base::Bind(&device::BatteryMonitorImpl::Create)); | 942       base::Bind(&device::BatteryMonitorImpl::Create)); | 
| 939 | 943 | 
| 940   mojo_application_host_->service_registry()->AddService( | 944   mojo_application_host_->service_registry()->AddService( | 
| 941       base::Bind(&device::VibrationManagerImpl::Create)); | 945       base::Bind(&device::VibrationManagerImpl::Create)); | 
| 942 | 946 | 
| 943   mojo_application_host_->service_registry()->AddService( | 947   mojo_application_host_->service_registry()->AddService( | 
| (...skipping 348 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2480   if (worker_ref_count_ == 0) | 2485   if (worker_ref_count_ == 0) | 
| 2481     Cleanup(); | 2486     Cleanup(); | 
| 2482 } | 2487 } | 
| 2483 | 2488 | 
| 2484 void RenderProcessHostImpl::GetAudioOutputControllers( | 2489 void RenderProcessHostImpl::GetAudioOutputControllers( | 
| 2485     const GetAudioOutputControllersCallback& callback) const { | 2490     const GetAudioOutputControllersCallback& callback) const { | 
| 2486   audio_renderer_host()->GetOutputControllers(callback); | 2491   audio_renderer_host()->GetOutputControllers(callback); | 
| 2487 } | 2492 } | 
| 2488 | 2493 | 
| 2489 }  // namespace content | 2494 }  // namespace content | 
| OLD | NEW | 
|---|