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

Unified Diff: components/pdf/renderer/ppb_pdf_impl.cc

Issue 505243003: pdf: Move PepperPDFHost into the pdf component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf-component
Patch Set: 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
« components/pdf.gypi ('K') | « components/pdf/renderer/ppb_pdf_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« components/pdf.gypi ('K') | « components/pdf/renderer/ppb_pdf_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698