Commit 57ae4c5d authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

Create separate Blink feature flags for Shape Detection APIs

The BarcodeDetector, FaceDetector and TextDetector APIs will be released
individually. This change creates separate runtime enabled feature flags
for each to allow this staggered release.

BarcodeDetector is marked stable for launch.

Intent to Ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/j-PLtssE5fo/budv_U6fCwAJ

Bug: 659138
Change-Id: I880ac0d4a619e907b7e310b514f082b470bfad14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717915
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarYoav Weiss <yoavweiss@chromium.org>
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741673}
parent b7d936c3
......@@ -49,9 +49,9 @@ class ShapeDetectionBrowserTest
public ::testing::WithParamInterface<struct TestParameters> {
public:
void SetUpCommandLine(base::CommandLine* command_line) override {
// Flag to enable ShapeDetection API.
// Enable FaceDetector since it is still experimental.
CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kEnableBlinkFeatures, "ShapeDetection");
switches::kEnableBlinkFeatures, "FaceDetector");
}
protected:
......
......@@ -7,7 +7,7 @@
[
Exposed=(Window,Worker),
SecureContext,
RuntimeEnabled=ShapeDetection
RuntimeEnabled=BarcodeDetector
] interface BarcodeDetector {
[CallWith=ExecutionContext, RaisesException, MeasureAs=ShapeDetection_BarcodeDetectorConstructor] constructor(optional BarcodeDetectorOptions barcodeDetectorOptions = {});
[CallWith=ScriptState] static Promise<sequence<BarcodeFormat>> getSupportedFormats();
......
......@@ -7,7 +7,7 @@
[
Exposed=(Window,Worker),
SecureContext,
RuntimeEnabled=ShapeDetection
RuntimeEnabled=FaceDetector
] interface FaceDetector {
[CallWith=ExecutionContext, MeasureAs=ShapeDetection_FaceDetectorConstructor] constructor(optional FaceDetectorOptions faceDetectorOptions = {});
[CallWith=ScriptState, MeasureAs=ShapeDetectionAPI] Promise<sequence<DetectedFace>> detect(ImageBitmapSource image);
......
......@@ -7,7 +7,7 @@
[
Exposed=(Window,Worker),
SecureContext,
RuntimeEnabled=ShapeDetection
RuntimeEnabled=TextDetector
] interface TextDetector {
[CallWith=ExecutionContext, MeasureAs=ShapeDetection_TextDetectorConstructor] constructor();
[CallWith=ScriptState, MeasureAs=ShapeDetectionAPI] Promise<sequence<DetectedText>> detect(ImageBitmapSource image);
......
......@@ -230,6 +230,10 @@
name: "Badging",
status: "stable",
},
{
name: "BarcodeDetector",
status: "stable",
},
{
name: "BidiCaretAffinity",
},
......@@ -706,6 +710,10 @@
{
name: "ExtraWebGLVideoTextureMetadata",
},
{
name: "FaceDetector",
status: "experimental",
},
{
name: "FallbackCursorMode",
},
......@@ -1582,10 +1590,6 @@
name: "ShadowPiercingDescendantCombinator",
status: "experimental",
},
{
name: "ShapeDetection",
status: "experimental",
},
{
name: "SharedArrayBuffer",
status: "stable",
......@@ -1649,6 +1653,10 @@
name: "SurfaceEmbeddingFeatures",
status: "stable",
},
{
name: "TextDetector",
status: "experimental",
},
{
name: "TextFragmentIdentifiers",
origin_trial_feature_name: "TextFragmentIdentifiers",
......
......@@ -49,6 +49,11 @@ interface BackgroundFetchUpdateUIEvent : BackgroundFetchEvent
attribute @@toStringTag
method constructor
method updateUI
interface BarcodeDetector
static method getSupportedFormats
attribute @@toStringTag
method constructor
method detect
interface Blob
attribute @@toStringTag
getter size
......
......@@ -42,6 +42,11 @@ Starting worker: resources/global-interface-listing-worker.js
[Worker] method match
[Worker] method matchAll
[Worker] setter onprogress
[Worker] interface BarcodeDetector
[Worker] static method getSupportedFormats
[Worker] attribute @@toStringTag
[Worker] method constructor
[Worker] method detect
[Worker] interface Blob
[Worker] attribute @@toStringTag
[Worker] getter size
......
......@@ -290,6 +290,11 @@ interface BarProp
attribute @@toStringTag
getter visible
method constructor
interface BarcodeDetector
static method getSupportedFormats
attribute @@toStringTag
method constructor
method detect
interface BaseAudioContext : EventTarget
attribute @@toStringTag
getter audioWorklet
......
......@@ -42,6 +42,11 @@ Starting worker: resources/global-interface-listing-worker.js
[Worker] method match
[Worker] method matchAll
[Worker] setter onprogress
[Worker] interface BarcodeDetector
[Worker] static method getSupportedFormats
[Worker] attribute @@toStringTag
[Worker] method constructor
[Worker] method detect
[Worker] interface Blob
[Worker] attribute @@toStringTag
[Worker] getter size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment