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

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
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/service_manager/service_manager_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" 213 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h"
214 #include "content/common/font_cache_dispatcher_win.h" 214 #include "content/common/font_cache_dispatcher_win.h"
215 #include "content/common/sandbox_win.h" 215 #include "content/common/sandbox_win.h"
216 #include "sandbox/win/src/sandbox_policy.h" 216 #include "sandbox/win/src/sandbox_policy.h"
217 #include "ui/display/win/dpi.h" 217 #include "ui/display/win/dpi.h"
218 #endif 218 #endif
219 219
220 #if defined(OS_MACOSX) 220 #if defined(OS_MACOSX)
221 #include "content/browser/bootstrap_sandbox_manager_mac.h" 221 #include "content/browser/bootstrap_sandbox_manager_mac.h"
222 #include "content/browser/mach_broker_mac.h" 222 #include "content/browser/mach_broker_mac.h"
223 #include "content/browser/shapedetection/face_detection_service_dispatcher.h"
223 #endif 224 #endif
224 225
225 #if defined(OS_POSIX) 226 #if defined(OS_POSIX)
226 #include "content/browser/zygote_host/zygote_communication_linux.h" 227 #include "content/browser/zygote_host/zygote_communication_linux.h"
227 #include "content/browser/zygote_host/zygote_host_impl_linux.h" 228 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
228 #include "content/public/browser/zygote_handle_linux.h" 229 #include "content/public/browser/zygote_handle_linux.h"
229 #endif // defined(OS_POSIX) 230 #endif // defined(OS_POSIX)
230 231
231 #if defined(USE_OZONE) 232 #if defined(USE_OZONE)
232 #include "ui/ozone/public/ozone_switches.h" 233 #include "ui/ozone/public/ozone_switches.h"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 #endif 1190 #endif
1190 } 1191 }
1191 1192
1192 void RenderProcessHostImpl::RegisterMojoInterfaces() { 1193 void RenderProcessHostImpl::RegisterMojoInterfaces() {
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_->AddAssociatedInterfaceForIOThread( 1197 channel_->AddAssociatedInterfaceForIOThread(
1197 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_)); 1198 base::Bind(&IndexedDBDispatcherHost::AddBinding, indexed_db_factory_));
1198 1199
1200 #if defined(OS_MACOSX)
1201 AddUIThreadInterface(
1202 registry.get(),
1203 base::Bind(&FaceDetectionServiceDispatcher::CreateMojoService));
1204 #endif
1205
1199 #if defined(OS_ANDROID) 1206 #if defined(OS_ANDROID)
1200 AddUIThreadInterface(registry.get(), 1207 AddUIThreadInterface(registry.get(),
1201 GetGlobalJavaInterfaces() 1208 GetGlobalJavaInterfaces()
1202 ->CreateInterfaceFactory<device::BatteryMonitor>()); 1209 ->CreateInterfaceFactory<device::BatteryMonitor>());
1203 AddUIThreadInterface( 1210 AddUIThreadInterface(
1204 registry.get(), GetGlobalJavaInterfaces() 1211 registry.get(), GetGlobalJavaInterfaces()
1205 ->CreateInterfaceFactory< 1212 ->CreateInterfaceFactory<
1206 shape_detection::mojom::FaceDetectionProvider>()); 1213 shape_detection::mojom::FaceDetectionProvider>());
1207 AddUIThreadInterface( 1214 AddUIThreadInterface(
1208 registry.get(), 1215 registry.get(),
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3052 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3046 3053
3047 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3054 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3048 // Capture the error message in a crash key value. 3055 // Capture the error message in a crash key value.
3049 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3056 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3050 bad_message::ReceivedBadMessage(render_process_id, 3057 bad_message::ReceivedBadMessage(render_process_id,
3051 bad_message::RPH_MOJO_PROCESS_ERROR); 3058 bad_message::RPH_MOJO_PROCESS_ERROR);
3052 } 3059 }
3053 3060
3054 } // namespace content 3061 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/service_manager/service_manager_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698