Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp

Issue 2527503003: FaceDetector: Pass |options| to parent constructor (Closed)
Patch Set: reillyg@ and haraken@ comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
index d5b57cdffc33fcc85ec2548b8ba971a09598a782..e2ea03b5f0fec7f197639ea752e4d4e5d988ec81 100644
--- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
@@ -49,6 +49,14 @@ ShapeDetector::ShapeDetector(LocalFrame& frame) {
frame.interfaceProvider()->getInterface(mojo::GetProxy(&m_service));
}
+ShapeDetector::ShapeDetector(LocalFrame& frame,
+ const FaceDetectorOptions& options)
+ : ShapeDetector(frame) {
+ m_options = mojom::blink::FaceDetectorOptions::New();
+ m_options->max_detected_faces = options.maxDetectedFaces();
+ m_options->fast_mode = options.fastMode();
+}
+
ScriptPromise ShapeDetector::detectShapes(
ScriptState* scriptState,
DetectorType detectorType,

Powered by Google App Engine
This is Rietveld 408576698