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

Unified Diff: chrome/browser/ui/webui/print_preview_ui_html_source.cc

Issue 6982030: Print Preview: Detecting plugin existence before generating the preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing pdf string completely Created 9 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
Index: chrome/browser/ui/webui/print_preview_ui_html_source.cc
diff --git a/chrome/browser/ui/webui/print_preview_ui_html_source.cc b/chrome/browser/ui/webui/print_preview_ui_html_source.cc
index be4b583b5190583bb94e9ab2cc247e53f21d8651..d95b6412de5bfe0704b2925b4cea5f193abed202 100644
--- a/chrome/browser/ui/webui/print_preview_ui_html_source.cc
+++ b/chrome/browser/ui/webui/print_preview_ui_html_source.cc
@@ -160,6 +160,11 @@ void PrintPreviewUIHTMLSource::StartDataRequest(const std::string& path,
*it = *(preview_data + i);
SendResponse(request_id, html_bytes);
return;
+ } else if (path == "blank.pdf") {
+ scoped_refptr<RefCountedStaticMemory> blank_bytes(
+ new RefCountedStaticMemory());
+ SendResponse(request_id, blank_bytes);
+ return;
} else {
// Invalid request.
scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes);
« chrome/browser/resources/print_preview.html ('K') | « chrome/browser/resources/print_preview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698