Chromium Code Reviews| Index: components/pdf/renderer/ppb_pdf_impl.cc |
| diff --git a/components/pdf/renderer/ppb_pdf_impl.cc b/components/pdf/renderer/ppb_pdf_impl.cc |
| index cca24bfc39191f1350a15c2d5d7b30c440f1c7cd..1f344f04e62e46559eb9b6ada5a455a055a9f232 100644 |
| --- a/components/pdf/renderer/ppb_pdf_impl.cc |
| +++ b/components/pdf/renderer/ppb_pdf_impl.cc |
| @@ -322,6 +322,10 @@ void SaveAs(PP_Instance instance_id) { |
| new PDFHostMsg_PDFSaveURLAs(render_view->GetRoutingID(), url, referrer)); |
| } |
| +void Print(PP_Instance instance) { |
| + PPB_PDF_Impl::InvokePrintingForInstance(instance); |
|
Lei Zhang
2014/08/26 21:58:26
Why do we bother making InvokePrintingForInstance(
sadrul
2014/08/27 01:05:15
The return value is used in PepperPDFHost::OnHostM
|
| +} |
| + |
| PP_Bool IsFeatureEnabled(PP_Instance instance, PP_PDFFeature feature) { |
| switch (feature) { |
| case PP_PDFFEATURE_HIDPI: |
| @@ -416,7 +420,7 @@ const PPB_PDF ppb_pdf = { // |
| &UserMetricsRecordAction, // |
| &HasUnsupportedFeature, // |
| &SaveAs, // |
| - &PPB_PDF_Impl::InvokePrintingForInstance, // |
| + &Print, // |
| &IsFeatureEnabled, // |
| &GetResourceImageForScale, // |
| &ModalPromptForPassword, // |
| @@ -433,9 +437,8 @@ const PPB_PDF* PPB_PDF_Impl::GetInterface() { |
| } |
| // static |
| -void PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { |
| - if (print_delegate) |
| - print_delegate->Print(instance_id); |
| +bool PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) { |
| + return print_delegate ? print_delegate->Print(instance_id) : false; |
| } |
| void PPB_PDF_Impl::SetPrintDelegate(PPB_PDF_Impl::PrintDelegate* delegate) { |