Index: chrome/renderer/print_web_view_helper.h |
diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h |
index 55a2e6be638d188e5fc8b1415c7fc76f5332be3a..9692cb146cde70f5448489496eea53024c7f55f3 100644 |
--- a/chrome/renderer/print_web_view_helper.h |
+++ b/chrome/renderer/print_web_view_helper.h |
@@ -18,6 +18,7 @@ |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintScalingOption.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" |
#include "ui/gfx/size.h" |
@@ -62,17 +63,22 @@ class PrepareFrameAndViewForPrint { |
void FinishPrinting(); |
private: |
- void StartPrinting(const gfx::Size& print_params); |
+ void StartPrinting(const gfx::Size& canvas_size, |
+ const gfx::Rect& printable_area, |
+ const gfx::Size& paper_size); |
WebKit::WebFrame* frame_; |
WebKit::WebNode node_to_print_; |
WebKit::WebView* web_view_; |
gfx::Size print_canvas_size_; |
+ gfx::Rect printable_area_; |
+ gfx::Size paper_size_; |
gfx::Size prev_view_size_; |
gfx::Size prev_scroll_offset_; |
int dpi_; |
int expected_pages_count_; |
bool use_browser_overlays_; |
+ WebKit::WebPrintScalingOption print_scaling_option_; |
bool finished_; |
DISALLOW_COPY_AND_ASSIGN(PrepareFrameAndViewForPrint); |
@@ -200,7 +206,7 @@ class PrintWebViewHelper |
// Initialize print page settings with default settings. |
// Used only for native printing workflow. |
- bool InitPrintSettings(); |
+ bool InitPrintSettings(bool fit_to_paper_size); |
// Initialize print page settings with default settings and prepare the frame |
// for print. A new PrepareFrameAndViewForPrint is created to fulfill the |