| Index: Source/core/page/ImageBitmapFactories.h
|
| diff --git a/Source/core/page/ImageBitmapFactories.h b/Source/core/page/ImageBitmapFactories.h
|
| index 05feca4ffc17d90f247e869bd42b51f43ae72575..8e39419b75d75090adc8c6cdbfd57f84a9a93735 100644
|
| --- a/Source/core/page/ImageBitmapFactories.h
|
| +++ b/Source/core/page/ImageBitmapFactories.h
|
| @@ -32,9 +32,37 @@
|
| #define ImageBitmapFactories_h
|
|
|
| #include "bindings/v8/ScriptPromiseResolver.h"
|
| +#include "bindings/v8/ScriptState.h"
|
| +#include "core/dom/EventTarget.h"
|
| +#include "core/fileapi/FileReaderLoader.h"
|
| +#include "core/fileapi/FileReaderLoaderClient.h"
|
| +#include "core/platform/graphics/IntRect.h"
|
| +#include "wtf/Forward.h"
|
|
|
| namespace WebCore {
|
|
|
| +class ImageBitmapLoader : public FileReaderLoaderClient {
|
| +
|
| +public:
|
| + ImageBitmapLoader(EventTarget*, PassRefPtr<ScriptPromiseResolver>, IntRect*);
|
| + void start(Blob*);
|
| +
|
| + ~ImageBitmapLoader() { }
|
| +
|
| +private:
|
| + virtual void didStartLoading() { }
|
| + virtual void didReceiveData() { }
|
| + virtual void didFinishLoading();
|
| + virtual void didFail(FileError::ErrorCode);
|
| +
|
| + EventTarget* m_eventTarget;
|
| + ScriptState* m_scriptState;
|
| + FileReaderLoader m_loader;
|
| + RefPtr<ScriptPromiseResolver> m_resolver;
|
| + IntRect* m_cropRect;
|
| +};
|
| +
|
| +class Blob;
|
| class CanvasRenderingContext2D;
|
| class EventTarget;
|
| class ExceptionState;
|
| @@ -54,6 +82,8 @@ ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, Exceptio
|
| ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionState&);
|
| ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, ExceptionState&);
|
| ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
|
| +ScriptObject createImageBitmap(EventTarget*, Blob*, ExceptionState&);
|
| +ScriptObject createImageBitmap(EventTarget*, Blob*, int sx, int sy, int sw, int sh, ExceptionState&);
|
| ScriptObject createImageBitmap(EventTarget*, ImageData*, ExceptionState&);
|
| ScriptObject createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
|
| ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, ExceptionState&);
|
|
|