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

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

Issue 2557513003: ShapeDetection: Eliminate DetectorType enum in ShapeDetector.cpp (Closed)
Patch Set: Remove state info from parent class, add doDetect() pure virtual method. Created 4 years 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.h
diff --git a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h
index 83b6054cc24f7320da13303ce73f9b3fe95b547b..041981187de3790f5a579591d47527ae597ab270 100644
--- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h
+++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h
@@ -10,7 +10,9 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "modules/ModulesExport.h"
#include "modules/canvas2d/CanvasRenderingContext2D.h"
+#include "modules/shapedetection/FaceDetectorOptions.h"
#include "modules/shapedetection/ShapeDetector.h"
+#include "public/platform/modules/shapedetection/facedetection.mojom-blink.h"
namespace blink {
@@ -23,12 +25,24 @@ class MODULES_EXPORT FaceDetector final : public ShapeDetector,
public:
static FaceDetector* create(Document&, const FaceDetectorOptions&);
- ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&);
DECLARE_VIRTUAL_TRACE();
private:
FaceDetector(LocalFrame&, const FaceDetectorOptions&);
~FaceDetector() override = default;
+
+ ScriptPromise doDetect(ScriptPromiseResolver*,
+ mojo::ScopedSharedBufferHandle,
+ int,
+ int);
Reilly Grant (use Gerrit) 2016/12/06 20:40:13 Same comment here.
xianglu 2016/12/06 22:31:56 Done.
+ void onDetectFaces(ScriptPromiseResolver*,
+ mojom::blink::FaceDetectionResultPtr);
+ void onFaceServiceConnectionError();
+
+ mojom::blink::FaceDetectionPtr m_faceService;
+ mojom::blink::FaceDetectorOptionsPtr m_faceDetectorOptions;
+
+ HeapHashSet<Member<ScriptPromiseResolver>> m_faceServiceRequests;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698