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

Unified Diff: chrome/renderer/print_web_view_helper.h

Issue 10083060: [Print Preview]: Added code to support pdf fit to page functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed UpdateFitToPageInfo function signature and updated comments 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 55a2e6be638d188e5fc8b1415c7fc76f5332be3a..bb9cfd5f115092e4901437bca058527dbb0eb4ba 100644
--- a/chrome/renderer/print_web_view_helper.h
+++ b/chrome/renderer/print_web_view_helper.h
@@ -160,6 +160,20 @@ class PrintWebViewHelper
// Returns true if the current destination printer is PRINT_TO_PDF.
bool IsPrintToPdfRequested(const base::DictionaryValue& settings);
+ // Returns false if
+ // (1) The current destination printer is SAVE_AS_PDF or
+ // (2) User is printing the preview data or
+ // (3) Source is PDF. This is the first preview request and print scaling
+ // option is disabled for initiator renderer plugin.
+ // In all other cases returns true to fit the print contents in paper size.
+ bool IsFitToPaperSizeRequested(const base::DictionaryValue& job_settings,
+ const PrintMsg_Print_Params& params);
+
+ // Returns true if the preview source is HTML, false otherwise.
+ bool IsSourceHTML(const WebKit::WebFrame* frame,
+ const WebKit::WebNode& node,
+ const base::DictionaryValue& job_settings);
+
// Initiate print preview.
void OnInitiatePrintPreview();

Powered by Google App Engine
This is Rietveld 408576698