shape_detection_service.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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
  3. // found in the LICENSE file.
  4. #ifndef SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SERVICE_H_
  5. #define SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SERVICE_H_
  6. #include "base/callback.h"
  7. #include "build/build_config.h"
  8. #include "mojo/public/cpp/bindings/pending_receiver.h"
  9. #include "mojo/public/cpp/bindings/receiver.h"
  10. #include "services/shape_detection/public/mojom/shape_detection_service.mojom.h"
  11. namespace shape_detection {
  12. class ShapeDetectionService : public mojom::ShapeDetectionService {
  13. public:
  14. explicit ShapeDetectionService(
  15. mojo::PendingReceiver<mojom::ShapeDetectionService> receiver);
  16. ShapeDetectionService(const ShapeDetectionService&) = delete;
  17. ShapeDetectionService& operator=(const ShapeDetectionService&) = delete;
  18. ~ShapeDetectionService() override;
  19. // mojom::ShapeDetectionService implementation:
  20. void BindBarcodeDetectionProvider(
  21. mojo::PendingReceiver<mojom::BarcodeDetectionProvider> receiver) override;
  22. void BindFaceDetectionProvider(
  23. mojo::PendingReceiver<mojom::FaceDetectionProvider> receiver) override;
  24. void BindTextDetection(
  25. mojo::PendingReceiver<mojom::TextDetection> receiver) override;
  26. private:
  27. mojo::Receiver<mojom::ShapeDetectionService> receiver_;
  28. };
  29. } // namespace shape_detection
  30. #endif // SERVICES_SHAPE_DETECTION_SHAPE_DETECTION_SERVICE_H_