| 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 ShapeDetector_h | 5 #ifndef ShapeDetector_h |
| 6 #define ShapeDetector_h | 6 #define ShapeDetector_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 ScriptPromiseResolver*, | 50 ScriptPromiseResolver*, |
| 51 uint8_t* data, | 51 uint8_t* data, |
| 52 int size, | 52 int size, |
| 53 int width, | 53 int width, |
| 54 int height); | 54 int height); |
| 55 void onDetectFaces(ScriptPromiseResolver*, | 55 void onDetectFaces(ScriptPromiseResolver*, |
| 56 mojom::blink::FaceDetectionResultPtr); | 56 mojom::blink::FaceDetectionResultPtr); |
| 57 void onDetectBarcodes(ScriptPromiseResolver*, | 57 void onDetectBarcodes(ScriptPromiseResolver*, |
| 58 Vector<mojom::blink::BarcodeDetectionResultPtr>); | 58 Vector<mojom::blink::BarcodeDetectionResultPtr>); |
| 59 | 59 |
| 60 // Error handlers for use if mojo service doesn't connect. |
| 61 void onFaceServiceConnectionError(); |
| 62 void onBarcodeServiceConnectionError(); |
| 63 |
| 60 mojom::blink::FaceDetectionPtr m_faceService; | 64 mojom::blink::FaceDetectionPtr m_faceService; |
| 61 mojom::blink::BarcodeDetectionPtr m_barcodeService; | 65 mojom::blink::BarcodeDetectionPtr m_barcodeService; |
| 62 | 66 |
| 63 HeapHashSet<Member<ScriptPromiseResolver>> m_serviceRequests; | 67 HeapHashSet<Member<ScriptPromiseResolver>> m_faceServiceRequests; |
| 68 HeapHashSet<Member<ScriptPromiseResolver>> m_barcodeServiceRequests; |
| 64 | 69 |
| 65 protected: | 70 protected: |
| 66 mojom::blink::FaceDetectorOptionsPtr m_faceDetectorOptions; | 71 mojom::blink::FaceDetectorOptionsPtr m_faceDetectorOptions; |
| 67 }; | 72 }; |
| 68 | 73 |
| 69 } // namespace blink | 74 } // namespace blink |
| 70 | 75 |
| 71 #endif // ShapeDetector_h | 76 #endif // ShapeDetector_h |
| OLD | NEW |