Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 203ee4bf33b1a3fbbc2b38b4f240c3c975d79cbc..02c8e80a81da0421790f4410dfe64697927744f8 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -1721,6 +1721,14 @@ void RenderViewImpl::printPage(WebLocalFrame* frame) { |
PrintPage(frame, handling_input_event_)); |
} |
+void RenderViewImpl::saveImageFromDataURL(const blink::WebString& data_url) { |
+ // Note: We should basically send GURL but we use size-limited string instead |
+ // in order to send a larger data url to save a image for <canvas> or <img>. |
+ const int MAX_LENGTH_OF_DATA_URL = 1024 * 1024 * 10; |
palmer
2014/09/02 17:58:04
Yeah, define this in 1 canonical place. The 2 decl
|
+ if (data_url.length() < MAX_LENGTH_OF_DATA_URL) |
+ Send(new ViewHostMsg_SaveImageFromDataURL(routing_id_, data_url.utf8())); |
+} |
+ |
bool RenderViewImpl::enumerateChosenDirectory( |
const WebString& path, |
WebFileChooserCompletion* chooser_completion) { |