| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 #include "content/public/common/content_constants.h" | 157 #include "content/public/common/content_constants.h" |
| 158 #include "content/public/common/content_features.h" | 158 #include "content/public/common/content_features.h" |
| 159 #include "content/public/common/content_switches.h" | 159 #include "content/public/common/content_switches.h" |
| 160 #include "content/public/common/mojo_channel_switches.h" | 160 #include "content/public/common/mojo_channel_switches.h" |
| 161 #include "content/public/common/process_type.h" | 161 #include "content/public/common/process_type.h" |
| 162 #include "content/public/common/resource_type.h" | 162 #include "content/public/common/resource_type.h" |
| 163 #include "content/public/common/result_codes.h" | 163 #include "content/public/common/result_codes.h" |
| 164 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 164 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| 165 #include "content/public/common/service_names.mojom.h" | 165 #include "content/public/common/service_names.mojom.h" |
| 166 #include "content/public/common/url_constants.h" | 166 #include "content/public/common/url_constants.h" |
| 167 #include "device/battery/battery_monitor_impl.h" | |
| 168 #include "device/gamepad/gamepad_monitor.h" | 167 #include "device/gamepad/gamepad_monitor.h" |
| 169 #include "gpu/GLES2/gl2extchromium.h" | 168 #include "gpu/GLES2/gl2extchromium.h" |
| 170 #include "gpu/command_buffer/client/gpu_switches.h" | 169 #include "gpu/command_buffer/client/gpu_switches.h" |
| 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 170 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 172 #include "gpu/command_buffer/service/gpu_switches.h" | 171 #include "gpu/command_buffer/service/gpu_switches.h" |
| 173 #include "gpu/ipc/host/gpu_memory_buffer_support.h" | 172 #include "gpu/ipc/host/gpu_memory_buffer_support.h" |
| 174 #include "ipc/ipc.mojom.h" | 173 #include "ipc/ipc.mojom.h" |
| 175 #include "ipc/ipc_channel.h" | 174 #include "ipc/ipc_channel.h" |
| 176 #include "ipc/ipc_channel_mojo.h" | 175 #include "ipc/ipc_channel_mojo.h" |
| 177 #include "ipc/ipc_logging.h" | 176 #include "ipc/ipc_logging.h" |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 channel_->AddAssociatedInterfaceForIOThread( | 1196 channel_->AddAssociatedInterfaceForIOThread( |
| 1198 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); | 1197 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); |
| 1199 | 1198 |
| 1200 #if defined(OS_MACOSX) | 1199 #if defined(OS_MACOSX) |
| 1201 AddUIThreadInterface( | 1200 AddUIThreadInterface( |
| 1202 registry.get(), | 1201 registry.get(), |
| 1203 base::Bind(&FaceDetectionServiceDispatcher::CreateMojoService)); | 1202 base::Bind(&FaceDetectionServiceDispatcher::CreateMojoService)); |
| 1204 #endif | 1203 #endif |
| 1205 | 1204 |
| 1206 #if defined(OS_ANDROID) | 1205 #if defined(OS_ANDROID) |
| 1207 AddUIThreadInterface(registry.get(), | |
| 1208 GetGlobalJavaInterfaces() | |
| 1209 ->CreateInterfaceFactory<device::BatteryMonitor>()); | |
| 1210 AddUIThreadInterface( | 1206 AddUIThreadInterface( |
| 1211 registry.get(), GetGlobalJavaInterfaces() | 1207 registry.get(), GetGlobalJavaInterfaces() |
| 1212 ->CreateInterfaceFactory< | 1208 ->CreateInterfaceFactory< |
| 1213 shape_detection::mojom::FaceDetectionProvider>()); | 1209 shape_detection::mojom::FaceDetectionProvider>()); |
| 1214 AddUIThreadInterface( | 1210 AddUIThreadInterface( |
| 1215 registry.get(), | 1211 registry.get(), |
| 1216 GetGlobalJavaInterfaces() | 1212 GetGlobalJavaInterfaces() |
| 1217 ->CreateInterfaceFactory<shape_detection::mojom::BarcodeDetection>()); | 1213 ->CreateInterfaceFactory<shape_detection::mojom::BarcodeDetection>()); |
| 1218 AddUIThreadInterface( | 1214 AddUIThreadInterface( |
| 1219 registry.get(), | 1215 registry.get(), |
| 1220 GetGlobalJavaInterfaces() | 1216 GetGlobalJavaInterfaces() |
| 1221 ->CreateInterfaceFactory<shape_detection::mojom::TextDetection>()); | 1217 ->CreateInterfaceFactory<shape_detection::mojom::TextDetection>()); |
| 1222 #else | |
| 1223 AddUIThreadInterface( | |
| 1224 registry.get(), base::Bind(&device::BatteryMonitorImpl::Create)); | |
| 1225 #endif | 1218 #endif |
| 1226 AddUIThreadInterface( | 1219 AddUIThreadInterface( |
| 1227 registry.get(), | 1220 registry.get(), |
| 1228 base::Bind(&PermissionServiceContext::CreateService, | 1221 base::Bind(&PermissionServiceContext::CreateService, |
| 1229 base::Unretained(permission_service_context_.get()))); | 1222 base::Unretained(permission_service_context_.get()))); |
| 1230 // TODO(mcasas): finalize arguments. | 1223 // TODO(mcasas): finalize arguments. |
| 1231 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); | 1224 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); |
| 1232 | 1225 |
| 1233 AddUIThreadInterface( | 1226 AddUIThreadInterface( |
| 1234 registry.get(), | 1227 registry.get(), |
| (...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3052 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3045 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3053 | 3046 |
| 3054 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3047 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3055 // Capture the error message in a crash key value. | 3048 // Capture the error message in a crash key value. |
| 3056 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3049 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3057 bad_message::ReceivedBadMessage(render_process_id, | 3050 bad_message::ReceivedBadMessage(render_process_id, |
| 3058 bad_message::RPH_MOJO_PROCESS_ERROR); | 3051 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3059 } | 3052 } |
| 3060 | 3053 |
| 3061 } // namespace content | 3054 } // namespace content |
| OLD | NEW |