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

Side by Side Diff: third_party/WebKit/Source/modules/shapedetection/FaceDetector.h

Issue 2502763005: ShapeDetection: Add FaceDetectorOptions for fastMode and maxDetectedFaces (Closed)
Patch Set: 80 cols 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef FaceDetector_h 5 #ifndef FaceDetector_h
6 #define FaceDetector_h 6 #define FaceDetector_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "modules/canvas2d/CanvasRenderingContext2D.h" 12 #include "modules/canvas2d/CanvasRenderingContext2D.h"
13 #include "modules/shapedetection/ShapeDetector.h" 13 #include "modules/shapedetection/ShapeDetector.h"
14 #include "public/platform/modules/shapedetection/shapedetection.mojom-blink.h" 14 #include "public/platform/modules/shapedetection/shapedetection.mojom-blink.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class LocalFrame; 18 class LocalFrame;
19 19
20 class MODULES_EXPORT FaceDetector final : public ShapeDetector, 20 class MODULES_EXPORT FaceDetector final : public ShapeDetector,
21 public ScriptWrappable { 21 public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
23 23
24 public: 24 public:
25 static FaceDetector* create(ScriptState*); 25 static FaceDetector* create(ScriptState*, const FaceDetectorOptions&);
26 26
27 ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&); 27 ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&);
28 DECLARE_VIRTUAL_TRACE(); 28 DECLARE_VIRTUAL_TRACE();
29 29
30 private: 30 private:
31 explicit FaceDetector(LocalFrame&); 31 explicit FaceDetector(LocalFrame&, const FaceDetectorOptions&);
32 ~FaceDetector() override = default; 32 ~FaceDetector() override = default;
33 }; 33 };
34 34
35 } // namespace blink 35 } // namespace blink
36 36
37 #endif // FaceDetector_h 37 #endif // FaceDetector_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698