Commit 999df0f2 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

Add use counter for the Shape Detection API

This use counter measures calls to the detect() methods provided by the
BarcodeDetector, FaceDetector and TextDetector classes. This is needed
by the Origin Trial infrastructure so that we can measure use of this
API in general rather than use of each detector type individually (which
is covered by the existing use counters).

Bug: 646035
Change-Id: Ic4c70b7e282b0569fad50f273aa9754b0bcb9bbf
Reviewed-on: https://chromium-review.googlesource.com/1161285Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarJason Chase <chasej@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580548}
parent 7c94defc
...@@ -1978,6 +1978,7 @@ enum WebFeature { ...@@ -1978,6 +1978,7 @@ enum WebFeature {
kAddDocumentLevelPassiveFalseWheelEventListener = 2519, kAddDocumentLevelPassiveFalseWheelEventListener = 2519,
kAddDocumentLevelPassiveDefaultWheelEventListener = 2520, kAddDocumentLevelPassiveDefaultWheelEventListener = 2520,
kDocumentLevelPassiveDefaultEventListenerPreventedWheel = 2521, kDocumentLevelPassiveDefaultEventListenerPreventedWheel = 2521,
kShapeDetectionAPI = 2522,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -11,5 +11,5 @@ ...@@ -11,5 +11,5 @@
MeasureAs=ShapeDetection_BarcodeDetectorConstructor, MeasureAs=ShapeDetection_BarcodeDetectorConstructor,
OriginTrialEnabled=ShapeDetection OriginTrialEnabled=ShapeDetection
] interface BarcodeDetector { ] interface BarcodeDetector {
[CallWith=ScriptState] Promise<sequence<DetectedBarcode>> detect(ImageBitmapSource image); [CallWith=ScriptState, MeasureAs=ShapeDetectionAPI] Promise<sequence<DetectedBarcode>> detect(ImageBitmapSource image);
}; };
...@@ -11,5 +11,5 @@ ...@@ -11,5 +11,5 @@
MeasureAs=ShapeDetection_FaceDetectorConstructor, MeasureAs=ShapeDetection_FaceDetectorConstructor,
OriginTrialEnabled=ShapeDetection OriginTrialEnabled=ShapeDetection
] interface FaceDetector { ] interface FaceDetector {
[CallWith=ScriptState] Promise<sequence<DetectedFace>> detect(ImageBitmapSource image); [CallWith=ScriptState, MeasureAs=ShapeDetectionAPI] Promise<sequence<DetectedFace>> detect(ImageBitmapSource image);
}; };
...@@ -11,5 +11,5 @@ ...@@ -11,5 +11,5 @@
MeasureAs=ShapeDetection_TextDetectorConstructor, MeasureAs=ShapeDetection_TextDetectorConstructor,
OriginTrialEnabled=ShapeDetection OriginTrialEnabled=ShapeDetection
] interface TextDetector { ] interface TextDetector {
[CallWith=ScriptState] Promise<sequence<DetectedText>> detect(ImageBitmapSource image); [CallWith=ScriptState, MeasureAs=ShapeDetectionAPI] Promise<sequence<DetectedText>> detect(ImageBitmapSource image);
}; };
...@@ -19528,6 +19528,7 @@ Called by update_net_error_codes.py.--> ...@@ -19528,6 +19528,7 @@ Called by update_net_error_codes.py.-->
<int value="2520" label="AddDocumentLevelPassiveDefaultWheelEventListener"/> <int value="2520" label="AddDocumentLevelPassiveDefaultWheelEventListener"/>
<int value="2521" <int value="2521"
label="DocumentLevelPassiveDefaultEventListenerPreventedWheel"/> label="DocumentLevelPassiveDefaultEventListenerPreventedWheel"/>
<int value="2522" label="ShapeDetectionAPI"/>
</enum> </enum>
<enum name="FeedbackSource"> <enum name="FeedbackSource">
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