naiveproxy/services/shape_detection/public/interfaces/barcodedetection.mojom
2018-01-28 13:32:06 -05:00

25 lines
775 B
Plaintext

// 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/#api
module shape_detection.mojom;
import "skia/public/interfaces/bitmap.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
struct BarcodeDetectionResult {
// Barcode or QR extracted contents (see e.g.
// https://github.com/zxing/zxing/wiki/Barcode-Contents).
string raw_value;
gfx.mojom.RectF bounding_box;
array<gfx.mojom.PointF> corner_points;
};
interface BarcodeDetection {
// |bitmap_data| contains tightly packed image pixels in row-major order.
Detect(skia.mojom.Bitmap bitmap_data)
=> (array<BarcodeDetectionResult> results);
};