+ // Wait for DidStopLoading. Continuing with this function while
+ // |is_loading_| is true will cause print preview to hang when try to
+ // print a PDF document.
+ if (is_loading_ && GetPlugin(print_preview_context_.source_frame())) {
+ on_stop_loading_closure_ =
+ base::Bind(&PrintWebViewHelper::RequestPrintPreview,
+ base::Unretained(this),
+ type);
+ return;
+ }
+