| 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 10 matching lines...) Expand all Loading... |
| 21 // https://github.com/WICG/shape-detection-api/issues/6 | 21 // https://github.com/WICG/shape-detection-api/issues/6 |
| 22 explicit ShapeDetector(LocalFrame&); | 22 explicit ShapeDetector(LocalFrame&); |
| 23 virtual ~ShapeDetector() = default; | 23 virtual ~ShapeDetector() = default; |
| 24 | 24 |
| 25 ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&); | 25 ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&); |
| 26 DEFINE_INLINE_VIRTUAL_TRACE() {} | 26 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 ScriptPromise detectShapesOnImageElement(ScriptPromiseResolver*, | 29 ScriptPromise detectShapesOnImageElement(ScriptPromiseResolver*, |
| 30 const HTMLImageElement*); | 30 const HTMLImageElement*); |
| 31 ScriptPromise detectShapesOnImageBitmap(ScriptPromiseResolver*, ImageBitmap*); | |
| 32 ScriptPromise detectShapesOnVideoElement(ScriptPromiseResolver*, | |
| 33 const HTMLVideoElement*); | |
| 34 | 31 |
| 35 virtual ScriptPromise doDetect(ScriptPromiseResolver*, | 32 virtual ScriptPromise doDetect(ScriptPromiseResolver*, |
| 36 mojo::ScopedSharedBufferHandle, | 33 mojo::ScopedSharedBufferHandle, |
| 37 int imageWidth, | 34 int imageWidth, |
| 38 int imageHeight) = 0; | 35 int imageHeight) = 0; |
| 39 }; | 36 }; |
| 40 | 37 |
| 41 } // namespace blink | 38 } // namespace blink |
| 42 | 39 |
| 43 #endif // ShapeDetector_h | 40 #endif // ShapeDetector_h |
| OLD | NEW |