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

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

Issue 2861263002: Shape Detection: move Java Face detection classes to //services/shape_detection (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | content/public/android/BUILD.gn » ('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 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 #endif 1220 #endif
1221 } 1221 }
1222 1222
1223 void RenderProcessHostImpl::RegisterMojoInterfaces() { 1223 void RenderProcessHostImpl::RegisterMojoInterfaces() {
1224 auto registry = base::MakeUnique<service_manager::BinderRegistry>(); 1224 auto registry = base::MakeUnique<service_manager::BinderRegistry>();
1225 1225
1226 channel_->AddAssociatedInterfaceForIOThread( 1226 channel_->AddAssociatedInterfaceForIOThread(
1227 base::Bind(&IndexedDBDispatcherHost::AddBinding, 1227 base::Bind(&IndexedDBDispatcherHost::AddBinding,
1228 base::Unretained(indexed_db_factory_.get()))); 1228 base::Unretained(indexed_db_factory_.get())));
1229 1229
1230 #if defined(OS_ANDROID)
1231 AddUIThreadInterface(
1232 registry.get(), GetGlobalJavaInterfaces()
1233 ->CreateInterfaceFactory<
1234 shape_detection::mojom::FaceDetectionProvider>());
1235 #else
1236 AddUIThreadInterface(
1237 registry.get(),
1238 base::Bind(&ForwardShapeDetectionRequest<
1239 shape_detection::mojom::FaceDetectionProviderRequest>));
1240 #endif
1241 AddUIThreadInterface( 1230 AddUIThreadInterface(
1242 registry.get(), 1231 registry.get(),
1243 base::Bind(&ForwardShapeDetectionRequest< 1232 base::Bind(&ForwardShapeDetectionRequest<
1244 shape_detection::mojom::BarcodeDetectionRequest>)); 1233 shape_detection::mojom::BarcodeDetectionRequest>));
1245 AddUIThreadInterface( 1234 AddUIThreadInterface(
1246 registry.get(), 1235 registry.get(),
1247 base::Bind(&ForwardShapeDetectionRequest< 1236 base::Bind(&ForwardShapeDetectionRequest<
1237 shape_detection::mojom::FaceDetectionProviderRequest>));
1238 AddUIThreadInterface(
1239 registry.get(),
1240 base::Bind(&ForwardShapeDetectionRequest<
1248 shape_detection::mojom::TextDetectionRequest>)); 1241 shape_detection::mojom::TextDetectionRequest>));
1249 1242
1250 AddUIThreadInterface( 1243 AddUIThreadInterface(
1251 registry.get(), 1244 registry.get(),
1252 base::Bind(&PermissionServiceContext::CreateService, 1245 base::Bind(&PermissionServiceContext::CreateService,
1253 base::Unretained(permission_service_context_.get()))); 1246 base::Unretained(permission_service_context_.get())));
1254 // TODO(mcasas): finalize arguments. 1247 // TODO(mcasas): finalize arguments.
1255 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); 1248 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create));
1256 1249
1257 AddUIThreadInterface( 1250 AddUIThreadInterface(
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
3119 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3112 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3120 3113
3121 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3114 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3122 // Capture the error message in a crash key value. 3115 // Capture the error message in a crash key value.
3123 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3116 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3124 bad_message::ReceivedBadMessage(render_process_id, 3117 bad_message::ReceivedBadMessage(render_process_id,
3125 bad_message::RPH_MOJO_PROCESS_ERROR); 3118 bad_message::RPH_MOJO_PROCESS_ERROR);
3126 } 3119 }
3127 3120
3128 } // namespace content 3121 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698