Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SERVICE_H_ | |
| 6 #define SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SERVICE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 #include "base/macros.h" | |
| 12 #include "services/service_manager/public/cpp/service.h" | |
| 13 #include "services/service_manager/public/cpp/service_context_ref.h" | |
| 14 #include "third_party/WebKit/public/platform/modules/shapedetection/facedetectio n.mojom.h" | |
| 15 | |
| 16 namespace shape_detection { | |
| 17 | |
| 18 // Factory function for use as an embedded service. | |
| 19 std::unique_ptr<service_manager::Service> CreateShapeDetectionService(); | |
|
Ken Rockot(use gerrit already)
2016/12/01 17:54:31
nit: Maybe just make it a static Create method on
xianglu
2016/12/02 18:11:24
Done.
| |
| 20 | |
| 21 class ShapeDetectionService : public service_manager::Service { | |
| 22 public: | |
| 23 ShapeDetectionService(); | |
| 24 ~ShapeDetectionService() override; | |
| 25 | |
| 26 // service_manager::Service: | |
| 27 void OnStart() override; | |
| 28 bool OnConnect(const service_manager::ServiceInfo& remote_info, | |
| 29 service_manager::InterfaceRegistry* registry) override; | |
| 30 bool OnStop() override; | |
| 31 | |
| 32 private: | |
| 33 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(ShapeDetectionService); | |
| 36 }; | |
| 37 | |
| 38 } // namespace shape_detection | |
| 39 | |
| 40 #endif // SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SERVICE_H_ | |
| OLD | NEW |