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

Side by Side Diff: Source/core/page/DOMWindow.h

Issue 20748002: Blob creation methods for ImageBitmap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Read blob as ArrayBuffer. Refactor into ImageBitmapFactories. 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) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 12 matching lines...) Expand all
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef DOMWindow_h 27 #ifndef DOMWindow_h
28 #define DOMWindow_h 28 #define DOMWindow_h
29 29
30 #include "bindings/v8/ScriptWrappable.h" 30 #include "bindings/v8/ScriptWrappable.h"
31 #include "core/dom/EventTarget.h" 31 #include "core/dom/EventTarget.h"
32 #include "core/page/FrameDestructionObserver.h" 32 #include "core/page/FrameDestructionObserver.h"
33 #include "core/page/ImageBitmapFactories.h"
33 #include "core/platform/Supplementable.h" 34 #include "core/platform/Supplementable.h"
34 35
35 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
36 37
37 namespace WebCore { 38 namespace WebCore {
38 class BarProp; 39 class BarProp;
40 class Blob;
39 class CSSRuleList; 41 class CSSRuleList;
40 class CSSStyleDeclaration; 42 class CSSStyleDeclaration;
41 class Console; 43 class Console;
42 class DOMApplicationCache; 44 class DOMApplicationCache;
43 class DOMPoint; 45 class DOMPoint;
44 class DOMSelection; 46 class DOMSelection;
45 class DOMURL; 47 class DOMURL;
46 class DOMWindowProperty; 48 class DOMWindowProperty;
47 class Database; 49 class Database;
48 class DatabaseCallback; 50 class DatabaseCallback;
49 class Document; 51 class Document;
50 class Element; 52 class Element;
51 class EventListener; 53 class EventListener;
52 class ExceptionState; 54 class ExceptionState;
53 class FloatRect; 55 class FloatRect;
54 class Frame; 56 class Frame;
55 class History; 57 class History;
56 class IDBFactory; 58 class IDBFactory;
59 class ImageBitmapLoader;
57 class Location; 60 class Location;
58 class MediaQueryList; 61 class MediaQueryList;
59 class MessageEvent; 62 class MessageEvent;
60 class Navigator; 63 class Navigator;
61 class Node; 64 class Node;
62 class Page; 65 class Page;
63 class PageConsole; 66 class PageConsole;
64 class Performance; 67 class Performance;
65 class PostMessageTimer; 68 class PostMessageTimer;
66 class RequestAnimationFrameCallback; 69 class RequestAnimationFrameCallback;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void resizeBy(float x, float y) const; 238 void resizeBy(float x, float y) const;
236 void resizeTo(float width, float height) const; 239 void resizeTo(float width, float height) const;
237 240
238 // WebKit animation extensions 241 // WebKit animation extensions
239 int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>); 242 int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>);
240 int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback >); 243 int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback >);
241 void cancelAnimationFrame(int id); 244 void cancelAnimationFrame(int id);
242 245
243 DOMWindowCSS* css(); 246 DOMWindowCSS* css();
244 247
248 void loadBlobAsync(ImageBitmapLoader*, Blob*);
Justin Novosad 2013/08/07 19:35:12 Why does this need to live in DOM window? it does
249 void finishedLoading(ImageBitmapLoader*);
250
245 // Events 251 // Events
246 // EventTarget API 252 // EventTarget API
247 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr< EventListener>, bool useCapture); 253 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr< EventListener>, bool useCapture);
248 virtual bool removeEventListener(const AtomicString& eventType, EventLis tener*, bool useCapture); 254 virtual bool removeEventListener(const AtomicString& eventType, EventLis tener*, bool useCapture);
249 virtual void removeAllEventListeners(); 255 virtual void removeAllEventListeners();
250 256
251 using EventTarget::dispatchEvent; 257 using EventTarget::dispatchEvent;
252 bool dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget> p rpTarget); 258 bool dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget> p rpTarget);
253 259
254 void dispatchLoadEvent(); 260 void dispatchLoadEvent();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 virtual EventTargetData* ensureEventTargetData(); 392 virtual EventTargetData* ensureEventTargetData();
387 393
388 void resetDOMWindowProperties(); 394 void resetDOMWindowProperties();
389 void willDestroyDocumentInFrame(); 395 void willDestroyDocumentInFrame();
390 396
391 RefPtr<Document> m_document; 397 RefPtr<Document> m_document;
392 398
393 bool m_shouldPrintWhenFinishedLoading; 399 bool m_shouldPrintWhenFinishedLoading;
394 400
395 HashSet<DOMWindowProperty*> m_properties; 401 HashSet<DOMWindowProperty*> m_properties;
402 HashSet<ImageBitmapLoader*> m_pendingImageBitmapLoaders;
396 403
397 mutable RefPtr<Screen> m_screen; 404 mutable RefPtr<Screen> m_screen;
398 mutable RefPtr<History> m_history; 405 mutable RefPtr<History> m_history;
399 mutable RefPtr<BarProp> m_locationbar; 406 mutable RefPtr<BarProp> m_locationbar;
400 mutable RefPtr<BarProp> m_menubar; 407 mutable RefPtr<BarProp> m_menubar;
401 mutable RefPtr<BarProp> m_personalbar; 408 mutable RefPtr<BarProp> m_personalbar;
402 mutable RefPtr<BarProp> m_scrollbars; 409 mutable RefPtr<BarProp> m_scrollbars;
403 mutable RefPtr<BarProp> m_statusbar; 410 mutable RefPtr<BarProp> m_statusbar;
404 mutable RefPtr<BarProp> m_toolbar; 411 mutable RefPtr<BarProp> m_toolbar;
405 mutable RefPtr<Console> m_console; 412 mutable RefPtr<Console> m_console;
(...skipping 21 matching lines...) Expand all
427 } 434 }
428 435
429 inline String DOMWindow::defaultStatus() const 436 inline String DOMWindow::defaultStatus() const
430 { 437 {
431 return m_defaultStatus; 438 return m_defaultStatus;
432 } 439 }
433 440
434 } // namespace WebCore 441 } // namespace WebCore
435 442
436 #endif // DOMWindow_h 443 #endif // DOMWindow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698