barcode_detection_provider_impl.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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_BARCODE_DETECTION_PROVIDER_IMPL_H_
  5. #define SERVICES_SHAPE_DETECTION_BARCODE_DETECTION_PROVIDER_IMPL_H_
  6. #include <memory>
  7. #include <utility>
  8. #include "mojo/public/cpp/bindings/pending_receiver.h"
  9. #include "mojo/public/cpp/bindings/self_owned_receiver.h"
  10. #include "services/shape_detection/public/mojom/barcodedetection_provider.mojom.h"
  11. namespace shape_detection {
  12. class BarcodeDetectionProviderImpl
  13. : public shape_detection::mojom::BarcodeDetectionProvider {
  14. public:
  15. ~BarcodeDetectionProviderImpl() override = default;
  16. static void Create(
  17. mojo::PendingReceiver<shape_detection::mojom::BarcodeDetectionProvider>
  18. receiver) {
  19. mojo::MakeSelfOwnedReceiver(
  20. std::make_unique<BarcodeDetectionProviderImpl>(), std::move(receiver));
  21. }
  22. void CreateBarcodeDetection(
  23. mojo::PendingReceiver<shape_detection::mojom::BarcodeDetection> receiver,
  24. shape_detection::mojom::BarcodeDetectorOptionsPtr options) override;
  25. void EnumerateSupportedFormats(
  26. EnumerateSupportedFormatsCallback callback) override;
  27. };
  28. } // namespace shape_detection
  29. #endif // SERVICES_SHAPE_DETECTION_BARCODE_DETECTION_PROVIDER_IMPL_H_