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

Side by Side Diff: Source/modules/imagebitmap/ImageBitmapFactories.h

Issue 22906002: Implement ImageBitmapFactories as a supplementary module. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep IDL implements statement. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ImageBitmapFactories_h 31 #ifndef ImageBitmapFactories_h
32 #define ImageBitmapFactories_h 32 #define ImageBitmapFactories_h
33 33
34 #include "bindings/v8/ScriptPromiseResolver.h" 34 #include "bindings/v8/ScriptPromiseResolver.h"
35 #include "core/page/DOMWindowProperty.h"
36 #include "core/platform/Supplementable.h"
35 37
36 namespace WebCore { 38 namespace WebCore {
37 39
38 class CanvasRenderingContext2D; 40 class CanvasRenderingContext2D;
41 class DOMWindow;
39 class EventTarget; 42 class EventTarget;
40 class ExceptionState; 43 class ExceptionState;
41 class HTMLCanvasElement; 44 class HTMLCanvasElement;
42 class HTMLImageElement; 45 class HTMLImageElement;
43 class HTMLVideoElement; 46 class HTMLVideoElement;
44 class ImageBitmap; 47 class ImageBitmap;
45 class ImageData; 48 class ImageData;
46 49
47 namespace ImageBitmapFactories { 50 class ImageBitmapFactories : public Supplement<DOMWindow>, public DOMWindowPrope rty {
do-not-use 2013/08/12 18:43:59 Do you really need to subclass DOMWindowProperty?
51 public:
52 static ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, Excep tionState&);
53 static ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, int s x, int sy, int sw, int sh, ExceptionState&);
54 static ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, Excep tionState&);
55 static ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, int s x, int sy, int sw, int sh, ExceptionState&);
56 static ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D *, ExceptionState&);
57 static ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D *, int sx, int sy, int sw, int sh, ExceptionState&);
58 static ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, Exce ptionState&);
59 static ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
60 static ScriptObject createImageBitmap(EventTarget*, ImageData*, ExceptionSta te&);
61 static ScriptObject createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
62 static ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, ExceptionS tate&);
63 static ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, int sx, in t sy, int sw, int sh, ExceptionState&);
48 64
49 ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, ExceptionState&) ; 65 virtual ~ImageBitmapFactories() { }
50 ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, int sx, int sy, int sw, int sh, ExceptionState&); 66 static ImageBitmapFactories* from(DOMWindow*);
51 ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, ExceptionState&) ;
52 ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, int sx, int sy, int sw, int sh, ExceptionState&);
53 ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, Exceptio nState&);
54 ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionState&);
55 ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, ExceptionState& );
56 ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
57 ScriptObject createImageBitmap(EventTarget*, ImageData*, ExceptionState&);
58 ScriptObject createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
59 ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, ExceptionState&);
60 ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, int sx, int sy, int s w, int sh, ExceptionState&);
61 67
62 } // namesapce ImageBitmapFactories 68 private:
69 explicit ImageBitmapFactories(DOMWindow*);
70 static const char* supplementName();
71 };
72
63 } // namespace WebCore 73 } // namespace WebCore
64 74
65 #endif // ImageBitmapFactories_h 75 #endif // ImageBitmapFactories_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698