Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2528743002: Shape Detection: Implement FaceDetection on Mac as out-of-process service (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" 112 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h"
113 #include "content/browser/renderer_host/render_message_filter.h" 113 #include "content/browser/renderer_host/render_message_filter.h"
114 #include "content/browser/renderer_host/render_view_host_delegate.h" 114 #include "content/browser/renderer_host/render_view_host_delegate.h"
115 #include "content/browser/renderer_host/render_view_host_impl.h" 115 #include "content/browser/renderer_host/render_view_host_impl.h"
116 #include "content/browser/renderer_host/render_widget_helper.h" 116 #include "content/browser/renderer_host/render_widget_helper.h"
117 #include "content/browser/renderer_host/render_widget_host_impl.h" 117 #include "content/browser/renderer_host/render_widget_host_impl.h"
118 #include "content/browser/renderer_host/text_input_client_message_filter.h" 118 #include "content/browser/renderer_host/text_input_client_message_filter.h"
119 #include "content/browser/resolve_proxy_msg_helper.h" 119 #include "content/browser/resolve_proxy_msg_helper.h"
120 #include "content/browser/service_worker/service_worker_context_wrapper.h" 120 #include "content/browser/service_worker/service_worker_context_wrapper.h"
121 #include "content/browser/service_worker/service_worker_dispatcher_host.h" 121 #include "content/browser/service_worker/service_worker_dispatcher_host.h"
122 #include "content/browser/shapedetection/face_detection_service_dispatcher.h"
122 #include "content/browser/shared_worker/shared_worker_message_filter.h" 123 #include "content/browser/shared_worker/shared_worker_message_filter.h"
123 #include "content/browser/shared_worker/worker_storage_partition.h" 124 #include "content/browser/shared_worker/worker_storage_partition.h"
124 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 125 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
125 #include "content/browser/storage_partition_impl.h" 126 #include "content/browser/storage_partition_impl.h"
126 #include "content/browser/streams/stream_context.h" 127 #include "content/browser/streams/stream_context.h"
127 #include "content/browser/tracing/trace_message_filter.h" 128 #include "content/browser/tracing/trace_message_filter.h"
128 #include "content/browser/websockets/websocket_manager.h" 129 #include "content/browser/websockets/websocket_manager.h"
129 #include "content/browser/webui/web_ui_controller_factory_registry.h" 130 #include "content/browser/webui/web_ui_controller_factory_registry.h"
130 #include "content/common/child_process_host_impl.h" 131 #include "content/common/child_process_host_impl.h"
131 #include "content/common/child_process_messages.h" 132 #include "content/common/child_process_messages.h"
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( 1194 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>(
1194 service_manager::mojom::kServiceManager_ConnectorSpec); 1195 service_manager::mojom::kServiceManager_ConnectorSpec);
1195 1196
1196 channel_->AddAssociatedInterface( 1197 channel_->AddAssociatedInterface(
1197 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, 1198 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
1198 base::Unretained(this))); 1199 base::Unretained(this)));
1199 1200
1200 channel_->AddAssociatedInterfaceForIOThread( 1201 channel_->AddAssociatedInterfaceForIOThread(
1201 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); 1202 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_));
1202 1203
1204 #if defined(OS_MACOSX)
1205 AddUIThreadInterface(
1206 registry.get(),
1207 base::Bind(&FaceDetectionServiceDispatcher::CreateMojoService));
1208 #endif
1209
1203 #if defined(OS_ANDROID) 1210 #if defined(OS_ANDROID)
1204 AddUIThreadInterface(registry.get(), 1211 AddUIThreadInterface(registry.get(),
1205 GetGlobalJavaInterfaces() 1212 GetGlobalJavaInterfaces()
1206 ->CreateInterfaceFactory<device::BatteryMonitor>()); 1213 ->CreateInterfaceFactory<device::BatteryMonitor>());
1207 AddUIThreadInterface( 1214 AddUIThreadInterface(
1208 registry.get(), GetGlobalJavaInterfaces() 1215 registry.get(), GetGlobalJavaInterfaces()
1209 ->CreateInterfaceFactory< 1216 ->CreateInterfaceFactory<
1210 shape_detection::mojom::FaceDetectionProvider>()); 1217 shape_detection::mojom::FaceDetectionProvider>());
1211 AddUIThreadInterface( 1218 AddUIThreadInterface(
1212 registry.get(), 1219 registry.get(),
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3046 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3040 3047
3041 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3048 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3042 // Capture the error message in a crash key value. 3049 // Capture the error message in a crash key value.
3043 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3050 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3044 bad_message::ReceivedBadMessage(render_process_id, 3051 bad_message::ReceivedBadMessage(render_process_id,
3045 bad_message::RPH_MOJO_PROCESS_ERROR); 3052 bad_message::RPH_MOJO_PROCESS_ERROR);
3046 } 3053 }
3047 3054
3048 } // namespace content 3055 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698