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

Side by Side Diff: Source/core/html/HTMLCanvasElement.h

Issue 917733002: HTMLCanvasElement.toDataURL should use IDL 'any' to avoid using custom binding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch rebased! Created 5 years, 10 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
« no previous file with comments | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 reset(); 101 reset();
102 } 102 }
103 103
104 // Called by HTMLCanvasElement's V8 bindings. 104 // Called by HTMLCanvasElement's V8 bindings.
105 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat ionAttributes&); 105 ScriptValue getContext(ScriptState*, const String&, const CanvasContextCreat ionAttributes&);
106 // Called by Document::getCSSCanvasContext as well as above getContext() var iant. 106 // Called by Document::getCSSCanvasContext as well as above getContext() var iant.
107 void getContext(const String&, const CanvasContextCreationAttributes&, Canva sRenderingContext2DOrWebGLRenderingContext&); 107 void getContext(const String&, const CanvasContextCreationAttributes&, Canva sRenderingContext2DOrWebGLRenderingContext&);
108 bool isPaintable() const; 108 bool isPaintable() const;
109 109
110 static String toEncodingMimeType(const String& mimeType); 110 static String toEncodingMimeType(const String& mimeType);
111 String toDataURL(const String& mimeType, const double* quality, ExceptionSta te&) const; 111 String toDataURL(const String& mimeType, const ScriptValue& qualityArgument, ExceptionState&) const;
112 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, 0, exceptionState); } 112 String toDataURL(const String& mimeType, ExceptionState& exceptionState) con st { return toDataURL(mimeType, ScriptValue(), exceptionState); }
113 113
114 // Used for rendering 114 // Used for rendering
115 void didDraw(const FloatRect&); 115 void didDraw(const FloatRect&);
116 void notifyObserversCanvasChanged(const FloatRect&); 116 void notifyObserversCanvasChanged(const FloatRect&);
117 117
118 void paint(GraphicsContext*, const LayoutRect&); 118 void paint(GraphicsContext*, const LayoutRect&);
119 119
120 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas 120 GraphicsContext* drawingContext() const; // Deprecated: use drawingCanvas
121 GraphicsContext* existingDrawingContext() const; // Deprecated: use existing DrawingCanvas 121 GraphicsContext* existingDrawingContext() const; // Deprecated: use existing DrawingCanvas
122 SkCanvas* drawingCanvas() const; 122 SkCanvas* drawingCanvas() const;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 bool m_imageBufferIsClear; 216 bool m_imageBufferIsClear;
217 OwnPtr<ImageBuffer> m_imageBuffer; 217 OwnPtr<ImageBuffer> m_imageBuffer;
218 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver; 218 mutable OwnPtr<GraphicsContextStateSaver> m_contextStateSaver;
219 219
220 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). 220 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue).
221 }; 221 };
222 222
223 } // namespace blink 223 } // namespace blink
224 224
225 #endif // HTMLCanvasElement_h 225 #endif // HTMLCanvasElement_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698