| Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| index 98ca698ed56415c5ab34ced2dbebc7737345efd6..3514fa7c3d5aa5aca786a735f12c3e66fa6b0c27 100644
|
| --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| @@ -113,6 +113,7 @@
|
| #include "third_party/WebKit/public/web/WebLocalFrame.h"
|
| #include "third_party/WebKit/public/web/WebPluginContainer.h"
|
| #include "third_party/WebKit/public/web/WebPrintParams.h"
|
| +#include "third_party/WebKit/public/web/WebPrintPresetOptions.h"
|
| #include "third_party/WebKit/public/web/WebPrintScalingOption.h"
|
| #include "third_party/WebKit/public/web/WebScopedUserGesture.h"
|
| #include "third_party/WebKit/public/web/WebScriptSource.h"
|
| @@ -1534,8 +1535,8 @@ bool PepperPluginInstanceImpl::LoadMouseLockInterface() {
|
| bool PepperPluginInstanceImpl::LoadPdfInterface() {
|
| if (!checked_for_plugin_pdf_interface_) {
|
| checked_for_plugin_pdf_interface_ = true;
|
| - plugin_pdf_interface_ = static_cast<const PPP_Pdf_1*>(
|
| - module_->GetPluginInterface(PPP_PDF_INTERFACE_1));
|
| + plugin_pdf_interface_ = static_cast<const PPP_Pdf*>(
|
| + module_->GetPluginInterface(PPP_PDF_INTERFACE_1_1));
|
| }
|
|
|
| return !!plugin_pdf_interface_;
|
| @@ -1841,6 +1842,25 @@ void PepperPluginInstanceImpl::PrintEnd() {
|
| #endif // defined(OS_MACOSX)
|
| }
|
|
|
| +bool PepperPluginInstanceImpl::GetPrintPresetOptionsFromDocument(
|
| + blink::WebPrintPresetOptions* preset_options) {
|
| + // Keep a reference on the stack. See NOTE above.
|
| + scoped_refptr<PepperPluginInstanceImpl> ref(this);
|
| + if (!LoadPdfInterface())
|
| + return false;
|
| +
|
| + PP_PrintPresetOptions_Dev options;
|
| + if (!plugin_pdf_interface_->GetPrintPresetOptionsFromDocument(pp_instance(),
|
| + &options)) {
|
| + return false;
|
| + }
|
| +
|
| + preset_options->isScalingDisabled = options.is_scaling_disabled;
|
| + preset_options->copies = options.copies;
|
| +
|
| + return true;
|
| +}
|
| +
|
| bool PepperPluginInstanceImpl::CanRotateView() {
|
| if (!LoadPdfInterface())
|
| return false;
|
|
|