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

Unified Diff: third_party/WebKit/Source/core/html/ImageData.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
Index: third_party/WebKit/Source/core/html/ImageData.h
diff --git a/third_party/WebKit/Source/core/html/ImageData.h b/third_party/WebKit/Source/core/html/ImageData.h
index 4cb126baa46b68d815be45dfa5bae9e8e78868f9..9c141196890d1d602a4a994352c0d31840f67bc5 100644
--- a/third_party/WebKit/Source/core/html/ImageData.h
+++ b/third_party/WebKit/Source/core/html/ImageData.h
@@ -32,6 +32,8 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
#include "core/dom/DOMTypedArray.h"
+#include "core/imagebitmap/ImageBitmapSource.h"
+#include "platform/geometry/IntRect.h"
#include "platform/geometry/IntSize.h"
#include "platform/heap/Handle.h"
#include "wtf/RefPtr.h"
@@ -40,7 +42,7 @@ namespace blink {
class ExceptionState;
-class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>, public ScriptWrappable {
+class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>, public ScriptWrappable, public ImageBitmapSource {
DEFINE_WRAPPERTYPEINFO();
public:
static ImageData* create(const IntSize&);
@@ -55,6 +57,10 @@ public:
const DOMUint8ClampedArray* data() const { return m_data.get(); }
DOMUint8ClampedArray* data() { return m_data.get(); }
+ // ImageBitmapSource implementation
+ IntSize bitmapSourceSize() const override { return m_size; }
+ ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, ExceptionState&) override;
+
DEFINE_INLINE_TRACE() { }
void dispose();
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLVideoElement.cpp ('k') | third_party/WebKit/Source/core/html/ImageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698