| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ImageBitmapSource_h | 5 #ifndef ImageBitmapSource_h |
| 6 #define ImageBitmapSource_h | 6 #define ImageBitmapSource_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/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| 11 #include "core/CoreExport.h" | 11 #include "core/CoreExport.h" |
| 12 #include "core/dom/ExceptionCode.h" | 12 #include "core/dom/ExceptionCode.h" |
| 13 #include "platform/geometry/IntRect.h" | 13 #include "platform/geometry/IntRect.h" |
| 14 #include "platform/geometry/IntSize.h" | 14 #include "platform/geometry/IntSize.h" |
| 15 #include "third_party/WebKit/Source/wtf/Optional.h" | 15 #include "platform/wtf/Optional.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class ImageBitmap; | 19 class ImageBitmap; |
| 20 class ImageBitmapOptions; | 20 class ImageBitmapOptions; |
| 21 | 21 |
| 22 class CORE_EXPORT ImageBitmapSource { | 22 class CORE_EXPORT ImageBitmapSource { |
| 23 public: | 23 public: |
| 24 virtual IntSize BitmapSourceSize() const { return IntSize(); } | 24 virtual IntSize BitmapSourceSize() const { return IntSize(); } |
| 25 virtual ScriptPromise CreateImageBitmap(ScriptState*, | 25 virtual ScriptPromise CreateImageBitmap(ScriptState*, |
| 26 EventTarget&, | 26 EventTarget&, |
| 27 Optional<IntRect>, | 27 Optional<IntRect>, |
| 28 const ImageBitmapOptions&, | 28 const ImageBitmapOptions&, |
| 29 ExceptionState&); | 29 ExceptionState&); |
| 30 | 30 |
| 31 virtual bool IsBlob() const { return false; } | 31 virtual bool IsBlob() const { return false; } |
| 32 | 32 |
| 33 static ScriptPromise FulfillImageBitmap(ScriptState*, ImageBitmap*); | 33 static ScriptPromise FulfillImageBitmap(ScriptState*, ImageBitmap*); |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 virtual ~ImageBitmapSource() {} | 36 virtual ~ImageBitmapSource() {} |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace blink | 39 } // namespace blink |
| 40 | 40 |
| 41 #endif | 41 #endif |
| OLD | NEW |