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

Unified Diff: chrome/renderer/pepper/ppb_pdf_impl.cc

Issue 467343003: Defer request to print a PDF when the user initiates the entire frame and the PDF hasn't loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added DCHECK to RequestPrintPreview(). Created 6 years, 4 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/pepper/ppb_pdf_impl.cc
diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc
index 16317adf2e728d154e580f2e3bfacaf11ca4c252..b27718545e733376d17338234924610ad3cca859 100644
--- a/chrome/renderer/pepper/ppb_pdf_impl.cc
+++ b/chrome/renderer/pepper/ppb_pdf_impl.cc
@@ -460,5 +460,10 @@ void PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) {
printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element);
if (helper)
helper->PrintNode(element);
+
+ // DidStopLoading() is not call anywhere. Calling it here fixes a problem
+ // where PrintWebViewHelper() is waiting for DidStopLoading to be called to
+ // progress the preview process.
+ DidStopLoading(instance_id);
ivandavid 2014/08/14 03:38:13 Is this an appropriate place to place DidStopLoadi
Vitaly Buka (NO REVIEWS) 2014/08/14 05:19:43 It does not look like a right place let's remove t
#endif // ENABLE_FULL_PRINTING
}
« no previous file with comments | « no previous file | chrome/renderer/printing/print_web_view_helper.h » ('j') | chrome/renderer/printing/print_web_view_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698