OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/pepper/ppb_pdf_impl.h" | 5 #include "chrome/renderer/pepper/ppb_pdf_impl.h" |
6 | 6 |
7 #include "base/files/scoped_file.h" | 7 #include "base/files/scoped_file.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 // static | 453 // static |
454 const PPB_PDF* PPB_PDF_Impl::GetInterface() { return &ppb_pdf; } | 454 const PPB_PDF* PPB_PDF_Impl::GetInterface() { return &ppb_pdf; } |
455 | 455 |
456 // static | 456 // static |
457 void PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { | 457 void PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { |
458 #if defined(ENABLE_FULL_PRINTING) | 458 #if defined(ENABLE_FULL_PRINTING) |
459 blink::WebElement element = GetWebElement(instance_id); | 459 blink::WebElement element = GetWebElement(instance_id); |
460 printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element); | 460 printing::PrintWebViewHelper* helper = GetPrintWebViewHelper(element); |
461 if (helper) | 461 if (helper) |
462 helper->PrintNode(element); | 462 helper->PrintNode(element); |
463 | |
464 // DidStopLoading() is not call anywhere. Calling it here fixes a problem | |
465 // where PrintWebViewHelper() is waiting for DidStopLoading to be called to | |
466 // progress the preview process. | |
467 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
| |
463 #endif // ENABLE_FULL_PRINTING | 468 #endif // ENABLE_FULL_PRINTING |
464 } | 469 } |
OLD | NEW |