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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 1609313002: Use BlobCallback in toBlob instead of FileCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase master and Renamed mimeType to contentType to match other bits in Blob.h Created 4 years, 11 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
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 769fe6799015ab6860264d491783084f8753ba66..85f5d4e1e5d29d5ba45d9c62987d537e0bef5296 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -580,7 +580,7 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, const ScriptValue& q
return toDataURLInternal(mimeType, quality, BackBuffer);
}
-void HTMLCanvasElement::toBlob(ScriptState* scriptState, FileCallback* callback, const String& mimeType, const ScriptValue& qualityArgument, ExceptionState& exceptionState)
+void HTMLCanvasElement::toBlob(ScriptState* scriptState, BlobCallback* callback, const String& mimeType, const ScriptValue& qualityArgument, ExceptionState& exceptionState)
{
if (!originClean()) {
exceptionState.throwSecurityError("Tainted canvases may not be exported.");
@@ -589,7 +589,7 @@ void HTMLCanvasElement::toBlob(ScriptState* scriptState, FileCallback* callback,
if (!isPaintable()) {
// If the canvas element's bitmap has no pixels
- Platform::current()->mainThread()->taskRunner()->postTask(BLINK_FROM_HERE, bind(&FileCallback::handleEvent, callback, nullptr));
+ Platform::current()->mainThread()->taskRunner()->postTask(BLINK_FROM_HERE, bind(&BlobCallback::handleEvent, callback, nullptr));
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCanvasElement.h ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698