| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #ifndef HTMLCanvasElement_h | 28 #ifndef HTMLCanvasElement_h |
| 29 #define HTMLCanvasElement_h | 29 #define HTMLCanvasElement_h |
| 30 | 30 |
| 31 #include "bindings/core/v8/ScriptValue.h" | 31 #include "bindings/core/v8/ScriptValue.h" |
| 32 #include "bindings/core/v8/UnionTypesCore.h" | 32 #include "bindings/core/v8/UnionTypesCore.h" |
| 33 #include "core/CoreExport.h" | 33 #include "core/CoreExport.h" |
| 34 #include "core/dom/DOMTypedArray.h" | 34 #include "core/dom/DOMTypedArray.h" |
| 35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
| 36 #include "core/dom/DocumentVisibilityObserver.h" | 36 #include "core/dom/DocumentVisibilityObserver.h" |
| 37 #include "core/fileapi/FileCallback.h" | 37 #include "core/fileapi/BlobCallback.h" |
| 38 #include "core/html/HTMLElement.h" | 38 #include "core/html/HTMLElement.h" |
| 39 #include "core/html/canvas/CanvasDrawListener.h" | 39 #include "core/html/canvas/CanvasDrawListener.h" |
| 40 #include "core/html/canvas/CanvasImageSource.h" | 40 #include "core/html/canvas/CanvasImageSource.h" |
| 41 #include "core/imagebitmap/ImageBitmapSource.h" | 41 #include "core/imagebitmap/ImageBitmapSource.h" |
| 42 #include "platform/geometry/FloatRect.h" | 42 #include "platform/geometry/FloatRect.h" |
| 43 #include "platform/geometry/IntSize.h" | 43 #include "platform/geometry/IntSize.h" |
| 44 #include "platform/graphics/GraphicsTypes.h" | 44 #include "platform/graphics/GraphicsTypes.h" |
| 45 #include "platform/graphics/GraphicsTypes3D.h" | 45 #include "platform/graphics/GraphicsTypes3D.h" |
| 46 #include "platform/graphics/ImageBufferClient.h" | 46 #include "platform/graphics/ImageBufferClient.h" |
| 47 #include "platform/heap/Handle.h" | 47 #include "platform/heap/Handle.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat
ionAttributes&); | 94 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat
ionAttributes&); |
| 95 // Called by Document::getCSSCanvasContext as well as above getContext(). | 95 // Called by Document::getCSSCanvasContext as well as above getContext(). |
| 96 CanvasRenderingContext* getCanvasRenderingContext(const String&, const Canva
sContextCreationAttributes&); | 96 CanvasRenderingContext* getCanvasRenderingContext(const String&, const Canva
sContextCreationAttributes&); |
| 97 | 97 |
| 98 bool isPaintable() const; | 98 bool isPaintable() const; |
| 99 | 99 |
| 100 static String toEncodingMimeType(const String& mimeType); | 100 static String toEncodingMimeType(const String& mimeType); |
| 101 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument,
ExceptionState&) const; | 101 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument,
ExceptionState&) const; |
| 102 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con
st { return toDataURL(mimeType, ScriptValue(), exceptionState); } | 102 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con
st { return toDataURL(mimeType, ScriptValue(), exceptionState); } |
| 103 | 103 |
| 104 void toBlob(ScriptState*, FileCallback*, const String& mimeType, const Scrip
tValue& qualityArgument, ExceptionState&); | 104 void toBlob(ScriptState*, BlobCallback*, const String& mimeType, const Scrip
tValue& qualityArgument, ExceptionState&); |
| 105 void toBlob(ScriptState* scriptState, FileCallback* callback, const String&
mimeType, ExceptionState& exceptionState) { return toBlob(scriptState, callback,
mimeType, ScriptValue(), exceptionState); } | 105 void toBlob(ScriptState* scriptState, BlobCallback* callback, const String&
mimeType, ExceptionState& exceptionState) { return toBlob(scriptState, callback,
mimeType, ScriptValue(), exceptionState); } |
| 106 | 106 |
| 107 // Used for canvas capture. | 107 // Used for canvas capture. |
| 108 void addListener(CanvasDrawListener*); | 108 void addListener(CanvasDrawListener*); |
| 109 void removeListener(CanvasDrawListener*); | 109 void removeListener(CanvasDrawListener*); |
| 110 | 110 |
| 111 // Used for rendering | 111 // Used for rendering |
| 112 void didDraw(const FloatRect&); | 112 void didDraw(const FloatRect&); |
| 113 | 113 |
| 114 void paint(GraphicsContext&, const LayoutRect&); | 114 void paint(GraphicsContext&, const LayoutRect&); |
| 115 | 115 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 mutable bool m_didFailToCreateImageBuffer; | 227 mutable bool m_didFailToCreateImageBuffer; |
| 228 bool m_imageBufferIsClear; | 228 bool m_imageBufferIsClear; |
| 229 OwnPtr<ImageBuffer> m_imageBuffer; | 229 OwnPtr<ImageBuffer> m_imageBuffer; |
| 230 | 230 |
| 231 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 231 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 } // namespace blink | 234 } // namespace blink |
| 235 | 235 |
| 236 #endif // HTMLCanvasElement_h | 236 #endif // HTMLCanvasElement_h |
| OLD | NEW |