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

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: tot-merge 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
« no previous file with comments | « 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 716ff9a1b31c4d17ef0df466f511a0afae6eb2f0..a26c740647451da4e870929818b1d9a145b94eae 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);
+}
+
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 (g_print_client)
- g_print_client->Print(instance_id);
+bool PPB_PDF_Impl::InvokePrintingForInstance(PP_Instance instance_id) {
+ return g_print_client ? g_print_client->Print(instance_id) : false;
}
void PPB_PDF_Impl::SetPrintClient(PPB_PDF_Impl::PrintClient* client) {
« no previous file with comments | « 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