Chromium Code Reviews| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 setHeight(newSize.height()); | 91 setHeight(newSize.height()); |
| 92 m_ignoreReset = false; | 92 m_ignoreReset = false; |
| 93 reset(); | 93 reset(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 // Called by Document::getCSSCanvasContext as well as above getContext(). | 96 // Called by Document::getCSSCanvasContext as well as above getContext(). |
| 97 CanvasRenderingContext* getCanvasRenderingContext(const String&, const Canva sContextCreationAttributes&); | 97 CanvasRenderingContext* getCanvasRenderingContext(const String&, const Canva sContextCreationAttributes&); |
| 98 | 98 |
| 99 bool isPaintable() const; | 99 bool isPaintable() const; |
| 100 | 100 |
| 101 static String toEncodingMimeType(const String& mimeType); | 101 enum RequestImageFunctionCallName { |
|
Justin Novosad
2016/03/22 20:23:02
Naming nit, you can be more concise here: EncodeRe
| |
| 102 ToDataURL = 0, | |
|
Justin Novosad
2016/03/22 20:23:02
EncodeReasonToDataURL
| |
| 103 ToBlobCallback = 1, | |
| 104 NumberOfRequestedImageFunctionCallNames | |
| 105 }; | |
| 106 static String toEncodingMimeType(const String& mimeType, const RequestImageF unctionCallName); | |
| 102 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; | 107 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const; |
| 103 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); } | 108 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); } |
| 104 | 109 |
| 105 void toBlob(BlobCallback*, const String& mimeType, const ScriptValue& qualit yArgument, ExceptionState&); | 110 void toBlob(BlobCallback*, const String& mimeType, const ScriptValue& qualit yArgument, ExceptionState&); |
| 106 void toBlob(BlobCallback* callback, const String& mimeType, ExceptionState& exceptionState) { return toBlob(callback, mimeType, ScriptValue(), exceptionStat e); } | 111 void toBlob(BlobCallback* callback, const String& mimeType, ExceptionState& exceptionState) { return toBlob(callback, mimeType, ScriptValue(), exceptionStat e); } |
| 107 | 112 |
| 108 // Used for canvas capture. | 113 // Used for canvas capture. |
| 109 void addListener(CanvasDrawListener*); | 114 void addListener(CanvasDrawListener*); |
| 110 void removeListener(CanvasDrawListener*); | 115 void removeListener(CanvasDrawListener*); |
| 111 | 116 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 mutable bool m_didFailToCreateImageBuffer; | 237 mutable bool m_didFailToCreateImageBuffer; |
| 233 bool m_imageBufferIsClear; | 238 bool m_imageBufferIsClear; |
| 234 OwnPtr<ImageBuffer> m_imageBuffer; | 239 OwnPtr<ImageBuffer> m_imageBuffer; |
| 235 | 240 |
| 236 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). | 241 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). |
| 237 }; | 242 }; |
| 238 | 243 |
| 239 } // namespace blink | 244 } // namespace blink |
| 240 | 245 |
| 241 #endif // HTMLCanvasElement_h | 246 #endif // HTMLCanvasElement_h |
| OLD | NEW |