OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 TextDetector_h | 5 #ifndef TextDetector_h |
6 #define TextDetector_h | 6 #define TextDetector_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 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 static TextDetector* create(); | 23 static TextDetector* create(); |
24 | 24 |
25 DECLARE_VIRTUAL_TRACE(); | 25 DECLARE_VIRTUAL_TRACE(); |
26 | 26 |
27 private: | 27 private: |
28 TextDetector(); | 28 TextDetector(); |
29 ~TextDetector() override = default; | 29 ~TextDetector() override = default; |
30 | 30 |
31 ScriptPromise doDetect(ScriptPromiseResolver*, | 31 ScriptPromise doDetect(ScriptPromiseResolver*, |
32 skia::mojom::blink::BitmapPtr) override; | 32 mojo::ScopedSharedBufferHandle, |
| 33 int imageWidth, |
| 34 int imageHeight) override; |
33 void onDetectText( | 35 void onDetectText( |
34 ScriptPromiseResolver*, | 36 ScriptPromiseResolver*, |
35 Vector<shape_detection::mojom::blink::TextDetectionResultPtr>); | 37 Vector<shape_detection::mojom::blink::TextDetectionResultPtr>); |
36 void onTextServiceConnectionError(); | 38 void onTextServiceConnectionError(); |
37 | 39 |
38 shape_detection::mojom::blink::TextDetectionPtr m_textService; | 40 shape_detection::mojom::blink::TextDetectionPtr m_textService; |
39 | 41 |
40 HeapHashSet<Member<ScriptPromiseResolver>> m_textServiceRequests; | 42 HeapHashSet<Member<ScriptPromiseResolver>> m_textServiceRequests; |
41 }; | 43 }; |
42 | 44 |
43 } // namespace blink | 45 } // namespace blink |
44 | 46 |
45 #endif // TextDetector_h | 47 #endif // TextDetector_h |
OLD | NEW |