blob: f7c5ce69690625b3fa6da865b96b3ed2ad61ded9 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://wicg.github.io/shape-detection-api/#barcode-detection-api
[
Constructor(optional BarcodeDetectorOptions barcodeDetectorOptions),
ConstructorCallWith=ExecutionContext,
Exposed=(Window,Worker),
SecureContext,
MeasureAs=ShapeDetection_BarcodeDetectorConstructor,
RaisesException=Constructor,
RuntimeEnabled=ShapeDetection
] interface BarcodeDetector {
[CallWith=ScriptState] static Promise<sequence<BarcodeFormat>> getSupportedFormats();
[CallWith=ScriptState, MeasureAs=ShapeDetectionAPI] Promise<sequence<DetectedBarcode>> detect(ImageBitmapSource image);
};