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

Unified Diff: chrome/browser/ui/webui/print_preview_ui.cc

Issue 8585017: PrintPreview: Honor the print media page size and margin values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added one more test Created 8 years, 11 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
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_ui.cc
diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc
index a18df7154c4f340739c6296659585183dfe6168d..e3331d9c19a3fd305726244e01c416e955a871a7 100644
--- a/chrome/browser/ui/webui/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview_ui.cc
@@ -202,7 +202,7 @@ void PrintPreviewUI::OnDidGetPreviewPageCount(
}
void PrintPreviewUI::OnDidGetDefaultPageLayout(
- const PageSizeMargins& page_layout) {
+ const PageSizeMargins& page_layout, bool has_custom_page_size_style) {
if (page_layout.margin_top < 0 || page_layout.margin_left < 0 ||
page_layout.margin_bottom < 0 || page_layout.margin_right < 0 ||
page_layout.content_width < 0 || page_layout.content_height < 0) {
@@ -218,7 +218,9 @@ void PrintPreviewUI::OnDidGetDefaultPageLayout(
layout.SetDouble(printing::kSettingContentWidth, page_layout.content_width);
layout.SetDouble(printing::kSettingContentHeight, page_layout.content_height);
- CallJavascriptFunction("onDidGetDefaultPageLayout", layout);
+ base::FundamentalValue has_page_size_style(has_custom_page_size_style);
+ CallJavascriptFunction("onDidGetDefaultPageLayout", layout,
+ has_page_size_style);
}
void PrintPreviewUI::OnDidPreviewPage(int page_number,
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698