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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 7056070: PrintPreview: Preview generation should not block print button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 6 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/renderer/print_web_view_helper.cc
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index ef8e5d51472dfcaa29e60762b68c52e372cd88bc..d587d4dd10b0ea0421f2968dd732e9e229dd731a 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -200,7 +200,7 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
// chrome/browser/resources/print_preview.js
WebElement pdf_element = document.getElementById("pdf-viewer");
if (pdf_element.isNull()) {
- NOTREACHED();
+ DidFinishPrinting(FAIL_PRINT);
Lei Zhang 2011/06/09 09:54:55 Can you explain how we reach this state? It seems
kmadhusu 2011/06/09 18:11:44 While testing I came across a test case which sati
return;
}
@@ -361,7 +361,7 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
web_view->mainFrame(),
l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT));
- if (notify_browser_of_print_failure_) {
+ if (notify_browser_of_print_failure_ && print_pages_params_.get()) {
int cookie = print_pages_params_->params.document_cookie;
Send(new PrintHostMsg_PrintingFailed(routing_id(), cookie));
}
« chrome/browser/ui/webui/print_preview_ui.h ('K') | « chrome/browser/ui/webui/print_preview_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698