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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapSource.h

Issue 1455763002: Use union type in ImageBitmapFactories.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using polymophism in ImageBitmapSource 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/imagebitmap/ImageBitmapSource.h
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapSource.h b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapSource.h
new file mode 100644
index 0000000000000000000000000000000000000000..e89f54f4d30a1992abaff2e60bc280b5ba25e521
--- /dev/null
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapSource.h
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ImageBitmapSource_h
+#define ImageBitmapSource_h
+
+#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptPromiseResolver.h"
+#include "bindings/core/v8/ScriptState.h"
+#include "core/CoreExport.h"
+#include "core/dom/ExceptionCode.h"
+#include "platform/geometry/IntSize.h"
+
+namespace blink {
+
+class ImageBitmap;
+
+class CORE_EXPORT ImageBitmapSource {
+public:
+ virtual IntSize bitmapSourceSize() { return IntSize(); }
+ virtual PassRefPtrWillBeRawPtr<ImageBitmap> createImageBitmap(EventTarget&, ImageBitmapSource*, int sx, int sy, int sw, int sh, ExceptionState&) { return nullptr; }
davve 2015/11/27 11:19:43 Drive-by review: Why do you pass ImageBitmapSource
xidachen 2015/11/27 19:00:25 Great comments! I remove this parameter and there
+
+ virtual bool isBlob() const { return false; }
+
+protected:
+ virtual ~ImageBitmapSource() {}
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.idl ('k') | third_party/WebKit/Source/core/imagebitmap/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698