barcode_detection_impl_mac_vision_api.mm 739 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 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. #include "services/shape_detection/barcode_detection_impl_mac_vision_api.h"
  5. #include "base/logging.h"
  6. namespace shape_detection {
  7. namespace {
  8. class VisionAPI : public VisionAPIInterface {
  9. public:
  10. VisionAPI() = default;
  11. ~VisionAPI() override = default;
  12. NSArray<VNBarcodeSymbology>* GetSupportedSymbologies() const override {
  13. return [VNDetectBarcodesRequest supportedSymbologies];
  14. }
  15. };
  16. } // namespace
  17. // static
  18. std::unique_ptr<VisionAPIInterface> VisionAPIInterface::Create() {
  19. return std::make_unique<VisionAPI>();
  20. }
  21. } // namespace shape_detection