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

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: Addressed review comments Created 9 years 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/common/print_messages.h
diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h
index c0af962682a551606feb7e7ca0eed34defa46aea..d3640c3dfd7dc261baf8dd5dc8ec0b648647ee49 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 printable_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(printable_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,

Powered by Google App Engine
This is Rietveld 408576698