| Index: third_party/WebKit/Source/core/html/canvas/ImageElementBase.h
|
| diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h b/third_party/WebKit/Source/core/html/canvas/ImageElementBase.h
|
| similarity index 69%
|
| rename from third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h
|
| rename to third_party/WebKit/Source/core/html/canvas/ImageElementBase.h
|
| index 4497a7925640ae1edf0e8b60a546f17b76277e16..d8060f49872c8985324795470203eb8a5fdb11b7 100644
|
| --- a/third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h
|
| +++ b/third_party/WebKit/Source/core/html/canvas/ImageElementBase.h
|
| @@ -2,11 +2,12 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CanvasImageElementSource_h
|
| -#define CanvasImageElementSource_h
|
| +#ifndef ImageElementBase_h
|
| +#define ImageElementBase_h
|
|
|
| #include "core/CoreExport.h"
|
| #include "core/html/canvas/CanvasImageSource.h"
|
| +#include "core/imagebitmap/ImageBitmapSource.h"
|
|
|
| namespace blink {
|
|
|
| @@ -14,11 +15,19 @@ class Element;
|
| class ImageLoader;
|
| class ImageResourceContent;
|
|
|
| -class CORE_EXPORT CanvasImageElementSource : public CanvasImageSource {
|
| +class CORE_EXPORT ImageElementBase : public CanvasImageSource,
|
| + public ImageBitmapSource {
|
| public:
|
| virtual ImageLoader& GetImageLoader() const = 0;
|
| virtual FloatSize SourceDefaultObjectSize() = 0;
|
|
|
| + IntSize BitmapSourceSize() const override;
|
| + ScriptPromise CreateImageBitmap(ScriptState*,
|
| + EventTarget&,
|
| + Optional<IntRect>,
|
| + const ImageBitmapOptions&,
|
| + ExceptionState&) override;
|
| +
|
| PassRefPtr<Image> GetSourceImageForCanvas(SourceImageStatus*,
|
| AccelerationHint,
|
| SnapshotReason,
|
| @@ -42,11 +51,12 @@ class CORE_EXPORT CanvasImageElementSource : public CanvasImageSource {
|
|
|
| const KURL& SourceURL() const override;
|
|
|
| - private:
|
| ImageResourceContent* CachedImage() const;
|
| +
|
| + private:
|
| const Element& GetElement() const;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // CanvasImageElementSource_h
|
| +#endif // ImageElementBase_h
|
|
|