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

Unified Diff: Source/modules/imagebitmap/ImageBitmapFactories.h

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months 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: Source/modules/imagebitmap/ImageBitmapFactories.h
diff --git a/Source/modules/imagebitmap/ImageBitmapFactories.h b/Source/modules/imagebitmap/ImageBitmapFactories.h
index f4a90c8e242df5bb973ce3c44bc2e21650bf3f23..c5e8103cd9da611b992b4bd508c5917195ce4c15 100644
--- a/Source/modules/imagebitmap/ImageBitmapFactories.h
+++ b/Source/modules/imagebitmap/ImageBitmapFactories.h
@@ -60,20 +60,20 @@ class ImageBitmapFactories FINAL : public Supplement<DOMWindow>, public WorkerSu
class ImageBitmapLoader;
public:
- static ScriptPromise createImageBitmap(EventTarget*, HTMLImageElement*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, HTMLImageElement*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, HTMLVideoElement*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, HTMLVideoElement*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, CanvasRenderingContext2D*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, HTMLCanvasElement*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, Blob*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, Blob*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, ImageData*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, ImageBitmap*, ExceptionState&);
- static ScriptPromise createImageBitmap(EventTarget*, ImageBitmap*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, HTMLImageElement*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, HTMLImageElement*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, HTMLVideoElement*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, HTMLVideoElement*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, CanvasRenderingContext2D*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, HTMLCanvasElement*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, Blob*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, Blob*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, ImageData*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, ImageBitmap*, ExceptionState&);
+ static ScriptPromise createImageBitmap(EventTarget&, ImageBitmap*, int sx, int sy, int sw, int sh, ExceptionState&);
void didFinishLoading(ImageBitmapLoader*);
@@ -82,7 +82,7 @@ public:
private:
class ImageBitmapLoader FINAL : public RefCounted<ImageBitmapLoader>, public FileReaderLoaderClient {
public:
- static PassRefPtr<ImageBitmapLoader> create(ImageBitmapFactories* factory, PassRefPtr<ScriptPromiseResolver> resolver, const IntRect& cropRect)
+ static PassRefPtr<ImageBitmapLoader> create(ImageBitmapFactories& factory, PassRefPtr<ScriptPromiseResolver> resolver, const IntRect& cropRect)
{
return adoptRef(new ImageBitmapLoader(factory, resolver, cropRect));
}
@@ -92,7 +92,7 @@ private:
virtual ~ImageBitmapLoader() { }
private:
- ImageBitmapLoader(ImageBitmapFactories*, PassRefPtr<ScriptPromiseResolver>, const IntRect&);
+ ImageBitmapLoader(ImageBitmapFactories&, PassRefPtr<ScriptPromiseResolver>, const IntRect&);
void rejectPromise();
@@ -110,10 +110,10 @@ private:
};
static const char* supplementName();
- static ImageBitmapFactories* from(EventTarget*);
+ static ImageBitmapFactories& from(EventTarget&);
template <class T>
- static ImageBitmapFactories* fromInternal(T*);
+ static ImageBitmapFactories& fromInternal(T&);
void addLoader(PassRefPtr<ImageBitmapLoader>);

Powered by Google App Engine
This is Rietveld 408576698