OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "services/shape_detection/shape_detection_service.h" | 5 #include "services/shape_detection/shape_detection_service.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "services/service_manager/public/cpp/service_context.h" | 8 #include "services/service_manager/public/cpp/service_context.h" |
9 #include "services/shape_detection/barcode_detection_impl.h" | 9 #include "services/shape_detection/barcode_detection_impl.h" |
10 #include "services/shape_detection/face_detection_provider_impl.h" | 10 #include "services/shape_detection/face_detection_provider_impl.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 void ShapeDetectionService::OnStart() { | 23 void ShapeDetectionService::OnStart() { |
24 ref_factory_.reset(new service_manager::ServiceContextRefFactory( | 24 ref_factory_.reset(new service_manager::ServiceContextRefFactory( |
25 base::Bind(&service_manager::ServiceContext::RequestQuit, | 25 base::Bind(&service_manager::ServiceContext::RequestQuit, |
26 base::Unretained(context())))); | 26 base::Unretained(context())))); |
27 registry_.AddInterface(base::Bind(&BarcodeDetectionImpl::Create)); | 27 registry_.AddInterface(base::Bind(&BarcodeDetectionImpl::Create)); |
28 registry_.AddInterface(base::Bind(&FaceDetectionProviderImpl::Create)); | 28 registry_.AddInterface(base::Bind(&FaceDetectionProviderImpl::Create)); |
29 registry_.AddInterface(base::Bind(&TextDetectionImpl::Create)); | 29 registry_.AddInterface(base::Bind(&TextDetectionImpl::Create)); |
30 } | 30 } |
31 | 31 |
32 void ShapeDetectionService::OnBindInterface( | 32 void ShapeDetectionService::OnBindInterface( |
33 const service_manager::ServiceInfo& source_info, | 33 const service_manager::BindSourceInfo& source_info, |
34 const std::string& interface_name, | 34 const std::string& interface_name, |
35 mojo::ScopedMessagePipeHandle interface_pipe) { | 35 mojo::ScopedMessagePipeHandle interface_pipe) { |
36 registry_.BindInterface(source_info.identity, interface_name, | 36 registry_.BindInterface(source_info.identity, interface_name, |
37 std::move(interface_pipe)); | 37 std::move(interface_pipe)); |
38 } | 38 } |
39 | 39 |
40 } // namespace shape_detection | 40 } // namespace shape_detection |
OLD | NEW |