Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmap.h

Issue 1455763002: Use union type in ImageBitmapFactories.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better argument passing Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.h ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/ImageBitmap.h
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.h b/third_party/WebKit/Source/core/frame/ImageBitmap.h
index 90090b72dfe1960ffc5d9bc10e4b3c6cf0d7b50b..59fbf3362f5c6d1b4df2c660b749340cbd4c4b32 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -9,6 +9,7 @@
#include "core/CoreExport.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/canvas/CanvasImageSource.h"
+#include "core/imagebitmap/ImageBitmapSource.h"
#include "platform/geometry/IntRect.h"
#include "platform/graphics/Image.h"
#include "platform/graphics/ImageBuffer.h"
@@ -23,7 +24,7 @@ class HTMLCanvasElement;
class HTMLVideoElement;
class ImageData;
-class CORE_EXPORT ImageBitmap final : public RefCountedWillBeGarbageCollectedFinalized<ImageBitmap>, public ScriptWrappable, public ImageLoaderClient, public CanvasImageSource {
+class CORE_EXPORT ImageBitmap final : public RefCountedWillBeGarbageCollectedFinalized<ImageBitmap>, public ScriptWrappable, public ImageLoaderClient, public CanvasImageSource, public ImageBitmapSource {
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ImageBitmap);
public:
@@ -51,6 +52,10 @@ public:
void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override;
FloatSize elementSize() const override;
+ // ImageBitmapSource implementation
+ IntSize bitmapSourceSize() const override { return size(); }
+ ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, ExceptionState&) override;
+
DECLARE_VIRTUAL_TRACE();
private:
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.h ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698