| 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 new SynchronousCompositorBrowserFilter(GetID()); | 1193 new SynchronousCompositorBrowserFilter(GetID()); |
| 1194 AddFilter(synchronous_compositor_filter_.get()); | 1194 AddFilter(synchronous_compositor_filter_.get()); |
| 1195 #endif | 1195 #endif |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 void RenderProcessHostImpl::RegisterMojoInterfaces() { | 1198 void RenderProcessHostImpl::RegisterMojoInterfaces() { |
| 1199 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( | 1199 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( |
| 1200 service_manager::mojom::kServiceManager_ConnectorSpec); | 1200 service_manager::mojom::kServiceManager_ConnectorSpec); |
| 1201 | 1201 |
| 1202 channel_->AddAssociatedInterfaceForIOThread( | 1202 channel_->AddAssociatedInterfaceForIOThread( |
| 1203 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); | 1203 base::Bind(&IndexedDBDispatcherHost::AddBinding, |
| 1204 base::Unretained(indexed_db_factory_.get()))); |
| 1205 AddObserver(indexed_db_factory_.get()); |
| 1204 | 1206 |
| 1205 #if defined(OS_ANDROID) | 1207 #if defined(OS_ANDROID) |
| 1206 AddUIThreadInterface(registry.get(), | 1208 AddUIThreadInterface(registry.get(), |
| 1207 GetGlobalJavaInterfaces() | 1209 GetGlobalJavaInterfaces() |
| 1208 ->CreateInterfaceFactory<device::BatteryMonitor>()); | 1210 ->CreateInterfaceFactory<device::BatteryMonitor>()); |
| 1209 AddUIThreadInterface( | 1211 AddUIThreadInterface( |
| 1210 registry.get(), GetGlobalJavaInterfaces() | 1212 registry.get(), GetGlobalJavaInterfaces() |
| 1211 ->CreateInterfaceFactory< | 1213 ->CreateInterfaceFactory< |
| 1212 shape_detection::mojom::FaceDetectionProvider>()); | 1214 shape_detection::mojom::FaceDetectionProvider>()); |
| 1213 AddUIThreadInterface( | 1215 AddUIThreadInterface( |
| (...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3067 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3066 | 3068 |
| 3067 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3069 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3068 // Capture the error message in a crash key value. | 3070 // Capture the error message in a crash key value. |
| 3069 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3071 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3070 bad_message::ReceivedBadMessage(render_process_id, | 3072 bad_message::ReceivedBadMessage(render_process_id, |
| 3071 bad_message::RPH_MOJO_PROCESS_ERROR); | 3073 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3072 } | 3074 } |
| 3073 | 3075 |
| 3074 } // namespace content | 3076 } // namespace content |
| OLD | NEW |