OLD | NEW |
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" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 static FaceDetector* create(Document&, const FaceDetectorOptions&); | 26 static FaceDetector* create(Document&, const FaceDetectorOptions&); |
27 | 27 |
28 DECLARE_VIRTUAL_TRACE(); | 28 DECLARE_VIRTUAL_TRACE(); |
29 | 29 |
30 private: | 30 private: |
31 FaceDetector(LocalFrame&, const FaceDetectorOptions&); | 31 FaceDetector(LocalFrame&, const FaceDetectorOptions&); |
32 ~FaceDetector() override = default; | 32 ~FaceDetector() override = default; |
33 | 33 |
34 ScriptPromise doDetect(ScriptPromiseResolver*, | 34 ScriptPromise doDetect(ScriptPromiseResolver*, |
35 mojo::ScopedSharedBufferHandle, | 35 skia::mojom::blink::BitmapPtr) override; |
36 int imageWidth, | |
37 int imageHeight) override; | |
38 void onDetectFaces(ScriptPromiseResolver*, | 36 void onDetectFaces(ScriptPromiseResolver*, |
39 shape_detection::mojom::blink::FaceDetectionResultPtr); | 37 shape_detection::mojom::blink::FaceDetectionResultPtr); |
40 void onFaceServiceConnectionError(); | 38 void onFaceServiceConnectionError(); |
41 | 39 |
42 shape_detection::mojom::blink::FaceDetectionPtr m_faceService; | 40 shape_detection::mojom::blink::FaceDetectionPtr m_faceService; |
43 | 41 |
44 HeapHashSet<Member<ScriptPromiseResolver>> m_faceServiceRequests; | 42 HeapHashSet<Member<ScriptPromiseResolver>> m_faceServiceRequests; |
45 }; | 43 }; |
46 | 44 |
47 } // namespace blink | 45 } // namespace blink |
48 | 46 |
49 #endif // FaceDetector_h | 47 #endif // FaceDetector_h |
OLD | NEW |