Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6361)

Unified Diff: chrome/renderer/print_web_view_helper.h

Issue 10142002: [Print Preview] Refactored code to support auto fit to page functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 99eb0a99b5349c1e9875494d507e61a291d1a48a..90c3a7e62b32a8560cc9749127532c2141eb3d20 100644
--- a/chrome/renderer/print_web_view_helper.h
+++ b/chrome/renderer/print_web_view_helper.h
@@ -200,7 +200,7 @@ class PrintWebViewHelper
// Initialize print page settings with default settings.
// Used only for native printing workflow.
- bool InitPrintSettings();
+ bool InitPrintSettings(WebKit::WebFrame* frame, const WebKit::WebNode& node);
// Initialize print page settings with default settings and prepare the frame
// for print. A new PrepareFrameAndViewForPrint is created to fulfill the
@@ -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.

Powered by Google App Engine
This is Rietveld 408576698