| 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 "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 static FaceDetector* Create(const FaceDetectorOptions&); | 25 static FaceDetector* Create(const FaceDetectorOptions&); |
| 26 | 26 |
| 27 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 explicit FaceDetector(const FaceDetectorOptions&); | 30 explicit FaceDetector(const FaceDetectorOptions&); |
| 31 ~FaceDetector() override = default; | 31 ~FaceDetector() override = default; |
| 32 | 32 |
| 33 ScriptPromise DoDetect(ScriptPromiseResolver*, | 33 ScriptPromise DoDetect(ScriptPromiseResolver*, |
| 34 mojo::ScopedSharedBufferHandle, | 34 skia::mojom::blink::BitmapPtr) override; |
| 35 int image_width, | |
| 36 int image_height) override; | |
| 37 void OnDetectFaces( | 35 void OnDetectFaces( |
| 38 ScriptPromiseResolver*, | 36 ScriptPromiseResolver*, |
| 39 Vector<shape_detection::mojom::blink::FaceDetectionResultPtr>); | 37 Vector<shape_detection::mojom::blink::FaceDetectionResultPtr>); |
| 40 void OnFaceServiceConnectionError(); | 38 void OnFaceServiceConnectionError(); |
| 41 | 39 |
| 42 shape_detection::mojom::blink::FaceDetectionPtr face_service_; | 40 shape_detection::mojom::blink::FaceDetectionPtr face_service_; |
| 43 | 41 |
| 44 HeapHashSet<Member<ScriptPromiseResolver>> face_service_requests_; | 42 HeapHashSet<Member<ScriptPromiseResolver>> face_service_requests_; |
| 45 }; | 43 }; |
| 46 | 44 |
| 47 } // namespace blink | 45 } // namespace blink |
| 48 | 46 |
| 49 #endif // FaceDetector_h | 47 #endif // FaceDetector_h |
| OLD | NEW |