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

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

Issue 2360783003: shapedetection module: Introduce basic structure for face detection (Closed)
Patch Set: Created 4 years, 3 months 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/FaceDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f5bf8dac600604129dbb8bb8c9c772d78940b00c
--- /dev/null
+++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
@@ -0,0 +1,26 @@
+// 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.
+
+#include "modules/shapedetection/FaceDetector.h"
+
+namespace blink {
+
+FaceDetector* FaceDetector::create()
+{
+ return new FaceDetector();
+}
+
+ScriptPromise FaceDetector::detect(ScriptState* scriptState, const HTMLImageElement* image)
+{
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromise promise = resolver->promise();
+ return promise;
mcasas 2016/09/21 23:25:48 I suggest instead of l.17-18: resolver->rejec
xianglu 2016/09/22 22:48:40 Done.
+}
+
+// void FaceDetector::onDetect(ScriptPromiseResolver* resolver,
+// HeapVector<Member<DetectedObject>> detectedList)
+// {
+// }
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698