Chromium Code Reviews| Index: content/browser/shapedetection/shape_detection_service_dispatcher.h |
| diff --git a/content/browser/shapedetection/face_detection_service_dispatcher.h b/content/browser/shapedetection/shape_detection_service_dispatcher.h |
| similarity index 45% |
| rename from content/browser/shapedetection/face_detection_service_dispatcher.h |
| rename to content/browser/shapedetection/shape_detection_service_dispatcher.h |
| index 8eb4824640310c2a7df72997824c88596ba64b0c..9dbc4e5ec8aa3e9ddbe7a48ecd46791f6b587593 100644 |
| --- a/content/browser/shapedetection/face_detection_service_dispatcher.h |
| +++ b/content/browser/shapedetection/shape_detection_service_dispatcher.h |
| @@ -2,23 +2,24 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_BROWSER_SHAPEDETECTION_FACE_DETECTION_SERVICE_DISPATCHER_H_ |
| -#define CONTENT_BROWSER_SHAPEDETECTION_FACE_DETECTION_SERVICE_DISPATCHER_H_ |
| +#ifndef CONTENT_BROWSER_SHAPEDETECTION_SHAPE_DETECTION_SERVICE_DISPATCHER_H_ |
| +#define CONTENT_BROWSER_SHAPEDETECTION_SHAPE_DETECTION_SERVICE_DISPATCHER_H_ |
| #include "content/common/content_export.h" |
| #include "content/public/common/service_manager_connection.h" |
| #include "services/service_manager/public/cpp/connector.h" |
| +#include "services/shape_detection/public/interfaces/barcodedetection.mojom.h" |
| #include "services/shape_detection/public/interfaces/constants.mojom.h" |
| #include "services/shape_detection/public/interfaces/facedetection_provider.mojom.h" |
| namespace content { |
| -// Because the renderer cannot launch an out-of-process service on its own, we |
| -// use |FaceDetectionServiceDispatcher| to forward requests to Service Manager, |
| -// which then starts Face Detection Service in a utility process. |
| -namespace FaceDetectionServiceDispatcher { |
| +// Since the renderer cannot launch an out-of-process service on its own, use |
| +// |FaceDetectionServiceDispatcher| to forward requests to Service Manager, |
| +// which then starts Face Detection Service as a utility process. |
| +namespace ShapeDetectionServiceDispatcher { |
|
Ken Rockot(use gerrit already)
2017/02/01 21:01:07
Maybe I missed this in a previous CL, but this is
mcasas
2017/02/02 19:40:33
That's very correct. Moved to render_process_host_
|
| -static void CreateMojoService( |
| +static void CreateFaceMojoService( |
| shape_detection::mojom::FaceDetectionProviderRequest request) { |
| service_manager::Connector* connector = |
| ServiceManagerConnection::GetForProcess()->GetConnector(); |
| @@ -26,8 +27,16 @@ static void CreateMojoService( |
| std::move(request)); |
| } |
| -} // namespace FaceDetectionServiceDispatcher |
| +static void CreateBarcodeMojoService( |
| + shape_detection::mojom::BarcodeDetectionRequest request) { |
| + service_manager::Connector* connector = |
| + ServiceManagerConnection::GetForProcess()->GetConnector(); |
| + connector->BindInterface(shape_detection::mojom::kServiceName, |
| + std::move(request)); |
| +} |
| + |
| +} // namespace ShapeDetectionServiceDispatcher |
| } // namespace content |
| -#endif // CONTENT_BROWSER_SHAPEDETECTION_FACE_DETECTION_SERVICE_DISPATCHER_H_ |
| +#endif // CONTENT_BROWSER_SHAPEDETECTION_SHAPE_DETECTION_SERVICE_DISPATCHER_H_ |