Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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/ImageBitmap.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 CanvasRenderingContext2D; | 43 class CanvasRenderingContext2D; |
| 42 class Console; | 44 class Console; |
| 43 class DOMApplicationCache; | 45 class DOMApplicationCache; |
| 44 class DOMPoint; | 46 class DOMPoint; |
| 45 class DOMSelection; | 47 class DOMSelection; |
| 46 class DOMURL; | 48 class DOMURL; |
| 47 class DOMWindowProperty; | 49 class DOMWindowProperty; |
| 48 class Database; | 50 class Database; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 238 void scrollTo(int x, int y) const; | 240 void scrollTo(int x, int y) const; |
| 239 void scroll(int x, int y) const { scrollTo(x, y); } | 241 void scroll(int x, int y) const { scrollTo(x, y); } |
| 240 | 242 |
| 241 void moveBy(float x, float y) const; | 243 void moveBy(float x, float y) const; |
| 242 void moveTo(float x, float y) const; | 244 void moveTo(float x, float y) const; |
| 243 | 245 |
| 244 void resizeBy(float x, float y) const; | 246 void resizeBy(float x, float y) const; |
| 245 void resizeTo(float width, float height) const; | 247 void resizeTo(float width, float height) const; |
| 246 | 248 |
| 247 // Images | 249 // Images |
| 248 void createImageBitmap(HTMLImageElement*, PassRefPtr<ImageBitmapCallback >, ExceptionCode&); | 250 void createImageBitmap(HTMLImageElement*, PassRefPtr<ImageBitmapCallback >, ExceptionCode&) const; |
| 249 void createImageBitmap(HTMLImageElement*, PassRefPtr<ImageBitmapCallback >, int sx, int sy, int sw, int sh, ExceptionCode&); | 251 void createImageBitmap(HTMLImageElement*, PassRefPtr<ImageBitmapCallback >, int sx, int sy, int sw, int sh, ExceptionCode&) const; |
| 250 void createImageBitmap(HTMLVideoElement*, PassRefPtr<ImageBitmapCallback >, ExceptionCode&); | 252 void createImageBitmap(HTMLVideoElement*, PassRefPtr<ImageBitmapCallback >, ExceptionCode&) const; |
| 251 void createImageBitmap(HTMLVideoElement*, PassRefPtr<ImageBitmapCallback >, int sx, int sy, int sw, int sh, ExceptionCode&); | 253 void createImageBitmap(HTMLVideoElement*, PassRefPtr<ImageBitmapCallback >, int sx, int sy, int sw, int sh, ExceptionCode&) const; |
| 252 void createImageBitmap(CanvasRenderingContext2D*, PassRefPtr<ImageBitmap Callback>, ExceptionCode&); | 254 void createImageBitmap(CanvasRenderingContext2D*, PassRefPtr<ImageBitmap Callback>, ExceptionCode&) const; |
| 253 void createImageBitmap(CanvasRenderingContext2D*, PassRefPtr<ImageBitmap Callback>, int sx, int sy, int sw, int sh, ExceptionCode&); | 255 void createImageBitmap(CanvasRenderingContext2D*, PassRefPtr<ImageBitmap Callback>, int sx, int sy, int sw, int sh, ExceptionCode&) const; |
| 254 void createImageBitmap(HTMLCanvasElement*, PassRefPtr<ImageBitmapCallbac k>, ExceptionCode&); | 256 void createImageBitmap(HTMLCanvasElement*, PassRefPtr<ImageBitmapCallbac k>, ExceptionCode&) const; |
| 255 void createImageBitmap(HTMLCanvasElement*, PassRefPtr<ImageBitmapCallbac k>, int sx, int sy, int sw, int sh, ExceptionCode&); | 257 void createImageBitmap(HTMLCanvasElement*, PassRefPtr<ImageBitmapCallbac k>, int sx, int sy, int sw, int sh, ExceptionCode&) const; |
| 256 void createImageBitmap(ImageData*, PassRefPtr<ImageBitmapCallback>, Exce ptionCode&); | 258 void createImageBitmap(Blob*, PassRefPtr<ImageBitmapCallback>, Exception Code&); |
| 257 void createImageBitmap(ImageData*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&); | 259 void createImageBitmap(Blob*, PassRefPtr<ImageBitmapCallback>, int sx, i nt sy, int sw, int sh, ExceptionCode&); |
| 258 void createImageBitmap(ImageBitmap*, PassRefPtr<ImageBitmapCallback>, Ex ceptionCode&); | 260 void createImageBitmap(ImageData*, PassRefPtr<ImageBitmapCallback>, Exce ptionCode&) const; |
| 259 void createImageBitmap(ImageBitmap*, PassRefPtr<ImageBitmapCallback>, in t sx, int sy, int sw, int sh, ExceptionCode&); | 261 void createImageBitmap(ImageData*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&) const; |
| 262 void createImageBitmap(ImageBitmap*, PassRefPtr<ImageBitmapCallback>, Ex ceptionCode&) const; | |
| 263 void createImageBitmap(ImageBitmap*, PassRefPtr<ImageBitmapCallback>, in t sx, int sy, int sw, int sh, ExceptionCode&) const; | |
| 264 void imageBitmapFinishedLoading(ImageBitmap*); | |
| 260 | 265 |
| 261 // WebKit animation extensions | 266 // WebKit animation extensions |
| 262 int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>); | 267 int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>); |
| 263 int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback >); | 268 int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback >); |
| 264 void cancelAnimationFrame(int id); | 269 void cancelAnimationFrame(int id); |
| 265 | 270 |
| 266 DOMWindowCSS* css(); | 271 DOMWindowCSS* css(); |
| 267 | 272 |
| 268 // Events | 273 // Events |
| 269 // EventTarget API | 274 // EventTarget API |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 virtual EventTargetData* ensureEventTargetData(); | 411 virtual EventTargetData* ensureEventTargetData(); |
| 407 | 412 |
| 408 void resetDOMWindowProperties(); | 413 void resetDOMWindowProperties(); |
| 409 void willDestroyDocumentInFrame(); | 414 void willDestroyDocumentInFrame(); |
| 410 | 415 |
| 411 RefPtr<Document> m_document; | 416 RefPtr<Document> m_document; |
| 412 | 417 |
| 413 bool m_shouldPrintWhenFinishedLoading; | 418 bool m_shouldPrintWhenFinishedLoading; |
| 414 | 419 |
| 415 HashSet<DOMWindowProperty*> m_properties; | 420 HashSet<DOMWindowProperty*> m_properties; |
| 421 HashSet<RefPtr<ImageBitmap> > m_pendingImageBitmaps; | |
|
Justin Novosad
2013/07/26 18:15:58
Before we start adding data members to Window, we
| |
| 416 | 422 |
| 417 mutable RefPtr<Screen> m_screen; | 423 mutable RefPtr<Screen> m_screen; |
| 418 mutable RefPtr<History> m_history; | 424 mutable RefPtr<History> m_history; |
| 419 mutable RefPtr<BarProp> m_locationbar; | 425 mutable RefPtr<BarProp> m_locationbar; |
| 420 mutable RefPtr<BarProp> m_menubar; | 426 mutable RefPtr<BarProp> m_menubar; |
| 421 mutable RefPtr<BarProp> m_personalbar; | 427 mutable RefPtr<BarProp> m_personalbar; |
| 422 mutable RefPtr<BarProp> m_scrollbars; | 428 mutable RefPtr<BarProp> m_scrollbars; |
| 423 mutable RefPtr<BarProp> m_statusbar; | 429 mutable RefPtr<BarProp> m_statusbar; |
| 424 mutable RefPtr<BarProp> m_toolbar; | 430 mutable RefPtr<BarProp> m_toolbar; |
| 425 mutable RefPtr<Console> m_console; | 431 mutable RefPtr<Console> m_console; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 447 } | 453 } |
| 448 | 454 |
| 449 inline String DOMWindow::defaultStatus() const | 455 inline String DOMWindow::defaultStatus() const |
| 450 { | 456 { |
| 451 return m_defaultStatus; | 457 return m_defaultStatus; |
| 452 } | 458 } |
| 453 | 459 |
| 454 } // namespace WebCore | 460 } // namespace WebCore |
| 455 | 461 |
| 456 #endif // DOMWindow_h | 462 #endif // DOMWindow_h |
| OLD | NEW |