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

Unified Diff: Source/core/html/HTMLCanvasElement.h

Issue 255563004: Implement "Save image as" for canvas (blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCanvasElement.h
diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h
index 8b94c2975e34c162771ef0dc138e15503d1a11fe..50f89547f91641a695aad9e6c39f330a013f8373 100644
--- a/Source/core/html/HTMLCanvasElement.h
+++ b/Source/core/html/HTMLCanvasElement.h
@@ -97,8 +97,8 @@ public:
CanvasRenderingContext* getContext(const String&, CanvasContextAttributes* attributes = 0);
static String toEncodingMimeType(const String& mimeType);
- String toDataURL(const String& mimeType, const double* quality, ExceptionState&);
- String toDataURL(const String& mimeType, ExceptionState& exceptionState) { return toDataURL(mimeType, 0, exceptionState); }
+ String toDataURL(const String& mimeType, const double* quality, ExceptionState&) const;
+ String toDataURL(const String& mimeType, ExceptionState& exceptionState) const { return toDataURL(mimeType, 0, exceptionState); }
// Used for rendering
void didDraw(const FloatRect&);
@@ -115,7 +115,7 @@ public:
ImageBuffer* buffer() const;
Image* copiedImage() const;
void clearCopiedImage();
- PassRefPtrWillBeRawPtr<ImageData> getImageData();
+ PassRefPtrWillBeRawPtr<ImageData> getImageData() const;
void makePresentationCopy();
void clearPresentationCopy();
@@ -133,6 +133,8 @@ public:
bool shouldAccelerate(const IntSize&) const;
+ virtual const AtomicString imageSourceURL() const OVERRIDE;
+
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
// DocumentVisibilityObserver implementation
@@ -171,6 +173,8 @@ private:
void updateExternallyAllocatedMemory() const;
+ String toDataURLInternal(const String& mimeType, const double* quality) const;
+
HashSet<CanvasObserver*> m_observers;
IntSize m_size;
« no previous file with comments | « no previous file | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698