summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/print_web_view_helper.h
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 02:45:46 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 02:45:46 +0000
commitb963516676ef524cfa75da691a05b6aff1a3d175 (patch)
treeb991ff3675675af6ab7f7a5a1341351829454bf7 /chrome/renderer/print_web_view_helper.h
parentdcd657a01f7a93f81b3cb23ffe8d27c9a4adadbb (diff)
downloadchromium_src-b963516676ef524cfa75da691a05b6aff1a3d175.zip
chromium_src-b963516676ef524cfa75da691a05b6aff1a3d175.tar.gz
chromium_src-b963516676ef524cfa75da691a05b6aff1a3d175.tar.bz2
[Print Preview] Refactored code to support auto fit to page functionality.
(1) Added |fit_to_paper_size| member variable in PrintMsg_Print_Params. (2) Removed |fit_to_page_| from PrintWebViewHelper. (3) Modified PrintWebViewHelper member functions accordingly. BUG=85132 TEST=none Review URL: http://codereview.chromium.org/10142002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper.h')
-rw-r--r--chrome/renderer/print_web_view_helper.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h
index 99eb0a9..55a2e6b 100644
--- a/chrome/renderer/print_web_view_helper.h
+++ b/chrome/renderer/print_web_view_helper.h
@@ -286,7 +286,6 @@ class PrintWebViewHelper
int page_index,
const PrintMsg_Print_Params& default_params,
bool ignore_css_margins,
- bool fit_to_page,
double* scale_factor,
printing::PageSizeMargins* page_layout_in_points);
@@ -297,8 +296,7 @@ class PrintWebViewHelper
const WebKit::WebNode& node,
PrepareFrameAndViewForPrint* prepare,
const PrintMsg_Print_Params& params,
- bool ignore_css_margins,
- bool fit_to_page);
+ bool ignore_css_margins);
// Given the |device| and |canvas| to draw on, prints the appropriate headers
// and footers using strings from |header_footer_info| on to the canvas.
@@ -355,10 +353,6 @@ class PrintWebViewHelper
bool is_print_ready_metafile_sent_;
bool ignore_css_margins_;
- // True if we need to auto fit to page else false.
- // NOTE: When we print to pdf, we don't fit to page.
- bool fit_to_page_;
-
// Used for scripted initiated printing blocking.
base::Time last_cancelled_script_print_;
int user_cancelled_scripted_print_count_;
@@ -394,8 +388,7 @@ class PrintWebViewHelper
// Create the print preview document. |pages| is empty to print all pages.
bool CreatePreviewDocument(PrintMsg_Print_Params* params,
const std::vector<int>& pages,
- bool ignore_css_margins,
- bool fit_to_page);
+ bool ignore_css_margins);
// Called after a page gets rendered. |page_time| is how long the
// rendering took.