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

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

Issue 1599413005: Use BlobCallback in toBlob instead of FileCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding BlobCallback for toBlob Use 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 344f364de0860036d92d08f1689df32d8b10d6e6..daa54777671a973e59e20706d1916edad279832f 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -577,7 +577,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.");
@@ -586,7 +586,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;
}

Powered by Google App Engine
This is Rietveld 408576698