Chromium Code Reviews| Index: third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp |
| diff --git a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp |
| index 3c37c16418579dff55b4361b5e935562045fdc9f..280940a9b24b26fdb98b5021df2e9b4da36f36f7 100644 |
| --- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp |
| +++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp |
| @@ -11,11 +11,18 @@ |
| namespace blink { |
| -FaceDetector* FaceDetector::create(ScriptState* scriptState) { |
| - return new FaceDetector(*scriptState->domWindow()->frame()); |
| +FaceDetector* FaceDetector::create(ScriptState* scriptState, |
| + const FaceDetectorOptions& options) { |
| + return new FaceDetector(*scriptState->domWindow()->frame(), options); |
| } |
| -FaceDetector::FaceDetector(LocalFrame& frame) : ShapeDetector(frame) {} |
| +FaceDetector::FaceDetector(LocalFrame& frame, |
| + const FaceDetectorOptions& options) |
| + : ShapeDetector(frame) { |
| + m_options = mojom::blink::FaceDetectorOptions::New(); |
|
mcasas
2016/11/21 23:19:26
Can you add this to the initialization list?
I.e.
xianglu
2016/11/22 00:59:13
In fact |m_options| is a protected variable of bas
|
| + m_options->maxDetectedFaces = options.maxDetectedFaces(); |
| + m_options->fastMode = options.fastMode(); |
| +} |
| ScriptPromise FaceDetector::detect(ScriptState* scriptState, |
| const CanvasImageSourceUnion& imageSource) { |