diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-05 00:13:52 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-05 00:13:52 +0000 |
commit | 789125a154a972deb76967014e5022f5989be9e1 (patch) | |
tree | 35493bf8f8414294f829fe3210569010b6af119d /chrome/common | |
parent | e05c2bfbe755499514ad252234f83e98e09721b2 (diff) | |
download | chromium_src-789125a154a972deb76967014e5022f5989be9e1.zip chromium_src-789125a154a972deb76967014e5022f5989be9e1.tar.gz chromium_src-789125a154a972deb76967014e5022f5989be9e1.tar.bz2 |
Printing selection from context menu.
BUG=83098
Review URL: https://chromiumcodereview.appspot.com/12177009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/print_messages.cc | 11 | ||||
-rw-r--r-- | chrome/common/print_messages.h | 28 |
2 files changed, 30 insertions, 9 deletions
diff --git a/chrome/common/print_messages.cc b/chrome/common/print_messages.cc index 8680ade..9d0111f 100644 --- a/chrome/common/print_messages.cc +++ b/chrome/common/print_messages.cc @@ -70,3 +70,14 @@ void PrintMsg_PrintPages_Params::Reset() { params.Reset(); pages = std::vector<int>(); } + +PrintHostMsg_RequestPrintPreview_Params:: + PrintHostMsg_RequestPrintPreview_Params() + : is_modifiable(false), + webnode_only(false), + has_selection(false), + selection_only(false) { +} + +PrintHostMsg_RequestPrintPreview_Params:: + ~PrintHostMsg_RequestPrintPreview_Params() {} diff --git a/chrome/common/print_messages.h b/chrome/common/print_messages.h index 8a79ebc..0b04f71 100644 --- a/chrome/common/print_messages.h +++ b/chrome/common/print_messages.h @@ -62,6 +62,15 @@ struct PrintMsg_PrintPages_Params { std::vector<int> pages; }; +struct PrintHostMsg_RequestPrintPreview_Params { + PrintHostMsg_RequestPrintPreview_Params(); + ~PrintHostMsg_RequestPrintPreview_Params(); + bool is_modifiable; + bool webnode_only; + bool has_selection; + bool selection_only; +}; + #endif // CHROME_COMMON_PRINT_MESSAGES_H_ #define IPC_MESSAGE_START PrintMsgStart @@ -151,6 +160,13 @@ IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) IPC_STRUCT_MEMBER(int, page_number) IPC_STRUCT_END() +IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) + IPC_STRUCT_TRAITS_MEMBER(is_modifiable) + IPC_STRUCT_TRAITS_MEMBER(webnode_only) + IPC_STRUCT_TRAITS_MEMBER(has_selection) + IPC_STRUCT_TRAITS_MEMBER(selection_only) +IPC_STRUCT_TRAITS_END() + IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) IPC_STRUCT_TRAITS_MEMBER(content_width) IPC_STRUCT_TRAITS_MEMBER(content_height) @@ -265,7 +281,7 @@ IPC_STRUCT_END() // Messages sent from the browser to the renderer. // Tells the render view to initiate print preview for the entire document. -IPC_MESSAGE_ROUTED0(PrintMsg_InitiatePrintPreview) +IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */) // Tells the render view to initiate printing or print preview for a particular // node, depending on which mode the render view is in. @@ -362,14 +378,8 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, #endif // Asks the browser to do print preview. -// |is_modifiable| is set to true when the request is for a web page, and false -// for a PDF. -// |webnode_only| is set to true if the document being printed is a specific -// WebNode, and false if the document is a full WebFrame. -IPC_MESSAGE_ROUTED3(PrintHostMsg_RequestPrintPreview, - bool /* is_modifiable */, - bool /* webnode_only */, - bool /* has_selection */) +IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, + PrintHostMsg_RequestPrintPreview_Params /* params */) // Notify the browser the number of pages in the print preview document. IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, |