| Index: chrome/renderer/pepper/ppb_pdf_impl.cc
|
| diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc
|
| index 388c4dd8d65d224640d56953bdc58c7c4cbd7765..cfbacb427b9c68ef0c63404d73b0f4a1a7ad2be8 100644
|
| --- a/chrome/renderer/pepper/ppb_pdf_impl.cc
|
| +++ b/chrome/renderer/pepper/ppb_pdf_impl.cc
|
| @@ -4,9 +4,11 @@
|
|
|
| #include "chrome/renderer/pepper/ppb_pdf_impl.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "build/build_config.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/render_messages.h"
|
| #include "chrome/renderer/print_web_view_helper.h"
|
| #include "content/public/common/child_process_sandbox_support_linux.h"
|
| @@ -347,6 +349,18 @@ void SaveAs(PP_Instance instance_id) {
|
| instance->delegate()->SaveURLAs(instance->plugin_url());
|
| }
|
|
|
| +PP_Bool IsFeatureEnabled(PP_PDFFeature feature) {
|
| + PP_Bool result = PP_FALSE;
|
| + switch (feature) {
|
| + case PP_PDFFEATURE_HIDPI:
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableHighDPIPDFPlugin))
|
| + result = PP_TRUE;
|
| + break;
|
| + }
|
| + return result;
|
| +}
|
| +
|
| const PPB_PDF ppb_pdf = {
|
| &GetLocalizedString,
|
| &GetResourceImage,
|
| @@ -360,7 +374,8 @@ const PPB_PDF ppb_pdf = {
|
| &UserMetricsRecordAction,
|
| &HasUnsupportedFeature,
|
| &SaveAs,
|
| - &PPB_PDF_Impl::InvokePrintingForInstance
|
| + &PPB_PDF_Impl::InvokePrintingForInstance,
|
| + &IsFeatureEnabled
|
| };
|
|
|
| } // namespace
|
|
|