Chromium Code Reviews| 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 fba9530d949c2f925f55381b3570493dbbc0ac19..e7f63eceeecf1c770a557baddb32355b02b44368 100644 |
| --- a/chrome/renderer/print_web_view_helper.h |
| +++ b/chrome/renderer/print_web_view_helper.h |
| @@ -117,6 +117,12 @@ class PrintWebViewHelper |
| // Print the document with the print preview frame/node. |
| void OnPrintForSystemDialog(); |
| + // Update |ignore_frame_margins_css_| based on settings. |
| + void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); |
| + |
| + // Returns true if the current destination printer is PRINT_TO_PDF. |
| + bool IsPrintToPdfRequested(const base::DictionaryValue& settings); |
| + |
| // Initiate print preview. |
| void OnInitiatePrintPreview(); |
| @@ -242,13 +248,18 @@ class PrintWebViewHelper |
| WebKit::WebFrame* frame, |
| int page_index, |
| const PrintMsg_Print_Params& default_params, |
| + bool ignore_frame_margins_css, |
| + bool fit_to_page, |
| + double* scale_factor, |
| printing::PageSizeMargins* page_layout_in_points); |
| static void UpdatePrintableSizeInPrintParameters( |
| WebKit::WebFrame* frame, |
| const WebKit::WebNode& node, |
| PrepareFrameAndViewForPrint* prepare, |
| - PrintMsg_Print_Params* params); |
| + PrintMsg_Print_Params* params, |
| + bool ignore_frame_margins_css, |
| + bool fit_to_page); |
| // Given the |device| and |canvas| to draw on, prints the appropriate headers |
| // and footers using strings from |header_footer_info| on to the canvas. |
| @@ -299,6 +310,11 @@ class PrintWebViewHelper |
| scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_; |
| bool is_preview_enabled_; |
| bool is_print_ready_metafile_sent_; |
| + bool ignore_frame_margins_css_; |
| + |
| + // True if the previewing/printing source is html. |
|
vandebo (ex-Chrome)
2011/12/02 01:28:19
Don't we already have ways to figure that out here
kmadhusu
2011/12/02 23:33:19
whoops.. I meant to write "True if we need to auto
|
| + // False if the source is pdf. |
| + bool fit_to_page_; |
| // Used for scripted initiated printing blocking. |
| base::Time last_cancelled_script_print_; |
| @@ -343,7 +359,9 @@ 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); |
| + const std::vector<int>& pages, |
| + bool ignore_frame_margins_css, |
| + bool fit_to_page); |
| // Called after a page gets rendered. |page_time| is how long the |
| // rendering took. |