| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "content/browser/blob_storage/blob_dispatcher_host.h" | 58 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
| 59 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 59 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 60 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 60 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
| 61 #include "content/browser/browser_child_process_host_impl.h" | 61 #include "content/browser/browser_child_process_host_impl.h" |
| 62 #include "content/browser/browser_main.h" | 62 #include "content/browser/browser_main.h" |
| 63 #include "content/browser/browser_main_loop.h" | 63 #include "content/browser/browser_main_loop.h" |
| 64 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 64 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 65 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 65 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 66 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" | 66 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
| 67 #include "content/browser/child_process_security_policy_impl.h" | 67 #include "content/browser/child_process_security_policy_impl.h" |
| 68 #include "content/browser/device_sensors/device_sensor_host.h" | |
| 69 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 68 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 70 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 69 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 71 #include "content/browser/fileapi/fileapi_message_filter.h" | 70 #include "content/browser/fileapi/fileapi_message_filter.h" |
| 72 #include "content/browser/frame_host/render_frame_message_filter.h" | 71 #include "content/browser/frame_host/render_frame_message_filter.h" |
| 73 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 72 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 74 #include "content/browser/gpu/compositor_util.h" | 73 #include "content/browser/gpu/compositor_util.h" |
| 75 #include "content/browser/gpu/gpu_client.h" | 74 #include "content/browser/gpu/gpu_client.h" |
| 76 #include "content/browser/gpu/gpu_data_manager_impl.h" | 75 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 77 #include "content/browser/gpu/gpu_process_host.h" | 76 #include "content/browser/gpu/gpu_process_host.h" |
| 78 #include "content/browser/gpu/shader_cache_factory.h" | 77 #include "content/browser/gpu/shader_cache_factory.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 #include "content/public/common/content_switches.h" | 158 #include "content/public/common/content_switches.h" |
| 160 #include "content/public/common/mojo_channel_switches.h" | 159 #include "content/public/common/mojo_channel_switches.h" |
| 161 #include "content/public/common/process_type.h" | 160 #include "content/public/common/process_type.h" |
| 162 #include "content/public/common/resource_type.h" | 161 #include "content/public/common/resource_type.h" |
| 163 #include "content/public/common/result_codes.h" | 162 #include "content/public/common/result_codes.h" |
| 164 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 163 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| 165 #include "content/public/common/service_names.mojom.h" | 164 #include "content/public/common/service_names.mojom.h" |
| 166 #include "content/public/common/url_constants.h" | 165 #include "content/public/common/url_constants.h" |
| 167 #include "device/battery/battery_monitor_impl.h" | 166 #include "device/battery/battery_monitor_impl.h" |
| 168 #include "device/gamepad/gamepad_monitor.h" | 167 #include "device/gamepad/gamepad_monitor.h" |
| 168 #include "device/sensors/device_sensor_host.h" |
| 169 #include "gpu/GLES2/gl2extchromium.h" | 169 #include "gpu/GLES2/gl2extchromium.h" |
| 170 #include "gpu/command_buffer/client/gpu_switches.h" | 170 #include "gpu/command_buffer/client/gpu_switches.h" |
| 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 172 #include "gpu/command_buffer/service/gpu_switches.h" | 172 #include "gpu/command_buffer/service/gpu_switches.h" |
| 173 #include "gpu/ipc/host/gpu_memory_buffer_support.h" | 173 #include "gpu/ipc/host/gpu_memory_buffer_support.h" |
| 174 #include "ipc/ipc.mojom.h" | 174 #include "ipc/ipc.mojom.h" |
| 175 #include "ipc/ipc_channel.h" | 175 #include "ipc/ipc_channel.h" |
| 176 #include "ipc/ipc_channel_mojo.h" | 176 #include "ipc/ipc_channel_mojo.h" |
| 177 #include "ipc/ipc_logging.h" | 177 #include "ipc/ipc_logging.h" |
| 178 #include "media/base/media_switches.h" | 178 #include "media/base/media_switches.h" |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), | 1274 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), |
| 1275 file_task_runner); | 1275 file_task_runner); |
| 1276 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) | 1276 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) |
| 1277 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), | 1277 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), |
| 1278 file_task_runner); | 1278 file_task_runner); |
| 1279 #endif | 1279 #endif |
| 1280 | 1280 |
| 1281 #if defined(OS_ANDROID) | 1281 #if defined(OS_ANDROID) |
| 1282 // On Android the device sensors implementations need to run on the UI thread | 1282 // On Android the device sensors implementations need to run on the UI thread |
| 1283 // to communicate to Java. | 1283 // to communicate to Java. |
| 1284 AddUIThreadInterface(registry.get(), base::Bind(&DeviceLightHost::Create)); | |
| 1285 AddUIThreadInterface(registry.get(), base::Bind(&DeviceMotionHost::Create)); | |
| 1286 AddUIThreadInterface(registry.get(), | 1284 AddUIThreadInterface(registry.get(), |
| 1287 base::Bind(&DeviceOrientationHost::Create)); | 1285 base::Bind(&device::DeviceLightHost::Create)); |
| 1288 AddUIThreadInterface(registry.get(), | 1286 AddUIThreadInterface(registry.get(), |
| 1289 base::Bind(&DeviceOrientationAbsoluteHost::Create)); | 1287 base::Bind(&device::DeviceMotionHost::Create)); |
| 1288 AddUIThreadInterface(registry.get(), |
| 1289 base::Bind(&device::DeviceOrientationHost::Create)); |
| 1290 AddUIThreadInterface( |
| 1291 registry.get(), |
| 1292 base::Bind(&device::DeviceOrientationAbsoluteHost::Create)); |
| 1290 #else | 1293 #else |
| 1291 // On platforms other than Android the device sensors implementations run on | 1294 // On platforms other than Android the device sensors implementations run on |
| 1292 // the IO thread. | 1295 // the IO thread. |
| 1293 registry->AddInterface(base::Bind(&DeviceLightHost::Create)); | 1296 registry->AddInterface(base::Bind(&device::DeviceLightHost::Create)); |
| 1294 registry->AddInterface(base::Bind(&DeviceMotionHost::Create)); | 1297 registry->AddInterface(base::Bind(&device::DeviceMotionHost::Create)); |
| 1295 registry->AddInterface(base::Bind(&DeviceOrientationHost::Create)); | 1298 registry->AddInterface(base::Bind(&device::DeviceOrientationHost::Create)); |
| 1296 registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create)); | 1299 registry->AddInterface( |
| 1300 base::Bind(&device::DeviceOrientationAbsoluteHost::Create)); |
| 1297 #endif // defined(OS_ANDROID) | 1301 #endif // defined(OS_ANDROID) |
| 1298 | 1302 |
| 1299 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create)); | 1303 registry->AddInterface(base::Bind(&device::GamepadMonitor::Create)); |
| 1300 | 1304 |
| 1301 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, | 1305 registry->AddInterface(base::Bind(&RenderProcessHostImpl::CreateMusGpuRequest, |
| 1302 base::Unretained(this))); | 1306 base::Unretained(this))); |
| 1303 | 1307 |
| 1304 registry->AddInterface( | 1308 registry->AddInterface( |
| 1305 base::Bind(&VideoCaptureHost::Create, | 1309 base::Bind(&VideoCaptureHost::Create, |
| 1306 BrowserMainLoop::GetInstance()->media_stream_manager())); | 1310 BrowserMainLoop::GetInstance()->media_stream_manager())); |
| (...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3056 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3060 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3057 | 3061 |
| 3058 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3062 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3059 // Capture the error message in a crash key value. | 3063 // Capture the error message in a crash key value. |
| 3060 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3064 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3061 bad_message::ReceivedBadMessage(render_process_id, | 3065 bad_message::ReceivedBadMessage(render_process_id, |
| 3062 bad_message::RPH_MOJO_PROCESS_ERROR); | 3066 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3063 } | 3067 } |
| 3064 | 3068 |
| 3065 } // namespace content | 3069 } // namespace content |
| OLD | NEW |