Chromium Code Reviews| Index: chrome/renderer/printing/print_web_view_helper.cc |
| diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc |
| index 420af085b49e22e4ce52dba80ff340694989117b..777eb69fa183c52236578b34969c60e803511b5e 100644 |
| --- a/chrome/renderer/printing/print_web_view_helper.cc |
| +++ b/chrome/renderer/printing/print_web_view_helper.cc |
| @@ -820,8 +820,7 @@ |
| void PrintWebViewHelper::DidStopLoading() { |
| is_loading_ = false; |
| - if (!on_stop_loading_closure_.is_null()) |
| - on_stop_loading_closure_.Run(); |
| + ShowScriptedPrintPreview(); |
| } |
| // Prints |frame| which called window.print(). |
| @@ -1712,9 +1711,6 @@ |
| // Wait for DidStopLoading. Plugins may not know the correct |
| // |is_modifiable| value until they are fully loaded, which occurs when |
| // DidStopLoading() is called. Defer showing the preview until then. |
| - on_stop_loading_closure_ = |
| - base::Bind(&PrintWebViewHelper::ShowScriptedPrintPreview, |
|
Vitaly Buka (NO REVIEWS)
2014/08/12 19:10:26
probably issue is some how related to these lines
|
| - base::Unretained(this)); |
| } else { |
| base::MessageLoop::current()->PostTask( |
| FROM_HERE, |
| @@ -1729,17 +1725,6 @@ |
| return; |
| } |
| case PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME: { |
| - // 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; |
| - } |
| - |
| break; |
| } |
| case PRINT_PREVIEW_USER_INITIATED_SELECTION: { |
| @@ -1748,15 +1733,6 @@ |
| break; |
| } |
| case PRINT_PREVIEW_USER_INITIATED_CONTEXT_NODE: { |
| - // Same situation as in PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME. |
| - if (is_loading_ && GetPlugin(print_preview_context_.source_frame())) { |
| - on_stop_loading_closure_ = |
| - base::Bind(&PrintWebViewHelper::RequestPrintPreview, |
| - base::Unretained(this), |
| - type); |
| - return; |
| - } |
| - |
| params.webnode_only = true; |
| break; |
| } |