Index: chrome/renderer/printing/print_web_view_helper.cc |
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc |
index 05247b11d5c6cc17af3fd5b5bce02bed76bd11d1..76999f7505b1bddab10528daf0da0cf128a1c6b7 100644 |
--- a/chrome/renderer/printing/print_web_view_helper.cc |
+++ b/chrome/renderer/printing/print_web_view_helper.cc |
@@ -39,6 +39,7 @@ |
#include "third_party/WebKit/public/web/WebPlugin.h" |
#include "third_party/WebKit/public/web/WebPluginDocument.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/WebScriptSource.h" |
#include "third_party/WebKit/public/web/WebSettings.h" |
@@ -1455,8 +1456,14 @@ void PrintWebViewHelper::SetOptionsFromDocument( |
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); |
const blink::WebNode& source_node = print_preview_context_.source_node(); |
- params.is_scaling_disabled = |
- source_frame->isPrintScalingDisabledForPlugin(source_node); |
+ blink::WebPrintPresetOptions preset_options; |
+ if (!source_frame->getPrintPresetOptionsForPlugin(source_node, |
+ &preset_options)) { |
+ return; |
+ } |
+ |
+ params.is_scaling_disabled = preset_options.isScalingDisabled; |
+ params.copies = preset_options.copies; |
} |
bool PrintWebViewHelper::UpdatePrintSettings( |