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

Unified Diff: chrome/common/print_messages.h

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.cc ('k') | chrome/common/print_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/print_messages.h
diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h
index fef30347358c44269004badabe0f0d7a000dba63..c97ead0d8bbfa833b8b597d704c03a6cf0aa9660 100644
--- a/chrome/common/print_messages.h
+++ b/chrome/common/print_messages.h
@@ -28,6 +28,7 @@ struct PrintMsg_Print_Params {
gfx::Size page_size;
gfx::Size content_size;
+ gfx::Rect printable_area;
int margin_top;
int margin_left;
double dpi;
@@ -40,6 +41,7 @@ struct PrintMsg_Print_Params {
std::string preview_ui_addr;
int preview_request_id;
bool is_first_request;
+ bool print_to_pdf;
bool display_header_footer;
string16 date;
string16 title;
@@ -72,6 +74,9 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params)
// In pixels according to dpi_x and dpi_y.
IPC_STRUCT_TRAITS_MEMBER(content_size)
+ // Physical printable area of the page in pixels according to dpi.
+ IPC_STRUCT_TRAITS_MEMBER(printable_area)
+
// The y-offset of the printable area, in pixels according to dpi.
IPC_STRUCT_TRAITS_MEMBER(margin_top)
@@ -110,6 +115,9 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params)
// True if this is the first preview request.
IPC_STRUCT_TRAITS_MEMBER(is_first_request)
+ // True if print to pdf is requested.
+ IPC_STRUCT_TRAITS_MEMBER(print_to_pdf)
+
// Specifies if the header and footer should be rendered.
IPC_STRUCT_TRAITS_MEMBER(display_header_footer)
@@ -351,8 +359,11 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount,
// Notify the browser of the default page layout according to the currently
// selected printer and page size.
-IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDefaultPageLayout,
- printing::PageSizeMargins /* page layout in points */)
+// |has_custom_page_size_style| is true when the printing frame has a custom
+// page size css otherwise false.
+IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetDefaultPageLayout,
+ printing::PageSizeMargins /* page layout in points */,
+ bool /* has custom page size style */)
// Notify the browser a print preview page has been rendered.
IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage,
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.cc ('k') | chrome/common/print_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698