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

Side by Side Diff: chrome/common/print_messages.h

Issue 12177009: Printing selection from context menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // IPC messages for printing. 5 // IPC messages for printing.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 PrintMsg_PrintPages_Params(); 55 PrintMsg_PrintPages_Params();
56 ~PrintMsg_PrintPages_Params(); 56 ~PrintMsg_PrintPages_Params();
57 57
58 // Resets the members of the struct to 0. 58 // Resets the members of the struct to 0.
59 void Reset(); 59 void Reset();
60 60
61 PrintMsg_Print_Params params; 61 PrintMsg_Print_Params params;
62 std::vector<int> pages; 62 std::vector<int> pages;
63 }; 63 };
64 64
65 struct PrintHostMsg_RequestPrintPreview_Params {
66 PrintHostMsg_RequestPrintPreview_Params();
67 ~PrintHostMsg_RequestPrintPreview_Params();
68 bool is_modifiable;
69 bool webnode_only;
70 bool has_selection;
71 bool selection_only;
72 };
73
65 #endif // CHROME_COMMON_PRINT_MESSAGES_H_ 74 #endif // CHROME_COMMON_PRINT_MESSAGES_H_
66 75
67 #define IPC_MESSAGE_START PrintMsgStart 76 #define IPC_MESSAGE_START PrintMsgStart
68 77
69 IPC_ENUM_TRAITS(printing::MarginType) 78 IPC_ENUM_TRAITS(printing::MarginType)
70 IPC_ENUM_TRAITS(WebKit::WebPrintScalingOption) 79 IPC_ENUM_TRAITS(WebKit::WebPrintScalingOption)
71 80
72 // Parameters for a render request. 81 // Parameters for a render request.
73 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) 82 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params)
74 // Physical size of the page, including non-printable margins, 83 // Physical size of the page, including non-printable margins,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) 153 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params)
145 // Parameters to render the page as a printed page. It must always be the same 154 // Parameters to render the page as a printed page. It must always be the same
146 // value for all the document. 155 // value for all the document.
147 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) 156 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params)
148 157
149 // The page number is the indicator of the square that should be rendered 158 // The page number is the indicator of the square that should be rendered
150 // according to the layout specified in PrintMsg_Print_Params. 159 // according to the layout specified in PrintMsg_Print_Params.
151 IPC_STRUCT_MEMBER(int, page_number) 160 IPC_STRUCT_MEMBER(int, page_number)
152 IPC_STRUCT_END() 161 IPC_STRUCT_END()
153 162
163 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params)
164 IPC_STRUCT_TRAITS_MEMBER(is_modifiable)
165 IPC_STRUCT_TRAITS_MEMBER(webnode_only)
166 IPC_STRUCT_TRAITS_MEMBER(has_selection)
167 IPC_STRUCT_TRAITS_MEMBER(selection_only)
168 IPC_STRUCT_TRAITS_END()
169
154 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) 170 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins)
155 IPC_STRUCT_TRAITS_MEMBER(content_width) 171 IPC_STRUCT_TRAITS_MEMBER(content_width)
156 IPC_STRUCT_TRAITS_MEMBER(content_height) 172 IPC_STRUCT_TRAITS_MEMBER(content_height)
157 IPC_STRUCT_TRAITS_MEMBER(margin_left) 173 IPC_STRUCT_TRAITS_MEMBER(margin_left)
158 IPC_STRUCT_TRAITS_MEMBER(margin_right) 174 IPC_STRUCT_TRAITS_MEMBER(margin_right)
159 IPC_STRUCT_TRAITS_MEMBER(margin_top) 175 IPC_STRUCT_TRAITS_MEMBER(margin_top)
160 IPC_STRUCT_TRAITS_MEMBER(margin_bottom) 176 IPC_STRUCT_TRAITS_MEMBER(margin_bottom)
161 IPC_STRUCT_TRAITS_END() 177 IPC_STRUCT_TRAITS_END()
162 178
163 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params) 179 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 IPC_STRUCT_MEMBER(int, cookie) 274 IPC_STRUCT_MEMBER(int, cookie)
259 IPC_STRUCT_MEMBER(int, expected_pages_count) 275 IPC_STRUCT_MEMBER(int, expected_pages_count)
260 IPC_STRUCT_MEMBER(bool, has_selection) 276 IPC_STRUCT_MEMBER(bool, has_selection)
261 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) 277 IPC_STRUCT_MEMBER(printing::MarginType, margin_type)
262 IPC_STRUCT_END() 278 IPC_STRUCT_END()
263 279
264 280
265 // Messages sent from the browser to the renderer. 281 // Messages sent from the browser to the renderer.
266 282
267 // Tells the render view to initiate print preview for the entire document. 283 // Tells the render view to initiate print preview for the entire document.
268 IPC_MESSAGE_ROUTED0(PrintMsg_InitiatePrintPreview) 284 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */)
269 285
270 // Tells the render view to initiate printing or print preview for a particular 286 // Tells the render view to initiate printing or print preview for a particular
271 // node, depending on which mode the render view is in. 287 // node, depending on which mode the render view is in.
272 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) 288 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
273 289
274 // Tells the renderer to print the print preview tab's PDF plugin without 290 // Tells the renderer to print the print preview tab's PDF plugin without
275 // showing the print dialog. (This is the final step in the print preview 291 // showing the print dialog. (This is the final step in the print preview
276 // workflow.) 292 // workflow.)
277 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, 293 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview,
278 DictionaryValue /* settings */) 294 DictionaryValue /* settings */)
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // in resulting NativeMetafile in printing. 371 // in resulting NativeMetafile in printing.
356 IPC_SYNC_MESSAGE_CONTROL0_2(PrintHostMsg_AllocateTempFileForPrinting, 372 IPC_SYNC_MESSAGE_CONTROL0_2(PrintHostMsg_AllocateTempFileForPrinting,
357 base::FileDescriptor /* temp file fd */, 373 base::FileDescriptor /* temp file fd */,
358 int /* fd in browser*/) 374 int /* fd in browser*/)
359 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, 375 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
360 int /* render_view_id */, 376 int /* render_view_id */,
361 int /* fd in browser */) 377 int /* fd in browser */)
362 #endif 378 #endif
363 379
364 // Asks the browser to do print preview. 380 // Asks the browser to do print preview.
365 // |is_modifiable| is set to true when the request is for a web page, and false 381 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
366 // for a PDF. 382 PrintHostMsg_RequestPrintPreview_Params /* params */)
367 // |webnode_only| is set to true if the document being printed is a specific
368 // WebNode, and false if the document is a full WebFrame.
369 IPC_MESSAGE_ROUTED3(PrintHostMsg_RequestPrintPreview,
370 bool /* is_modifiable */,
371 bool /* webnode_only */,
372 bool /* has_selection */)
373 383
374 // Notify the browser the number of pages in the print preview document. 384 // Notify the browser the number of pages in the print preview document.
375 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, 385 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount,
376 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) 386 PrintHostMsg_DidGetPreviewPageCount_Params /* params */)
377 387
378 // Notify the browser of the default page layout according to the currently 388 // Notify the browser of the default page layout according to the currently
379 // selected printer and page size. 389 // selected printer and page size.
380 // |printable_area_in_points| Specifies the printable area in points. 390 // |printable_area_in_points| Specifies the printable area in points.
381 // |has_custom_page_size_style| is true when the printing frame has a custom 391 // |has_custom_page_size_style| is true when the printing frame has a custom
382 // page size css otherwise false. 392 // page size css otherwise false.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 int /* document cookie */) 430 int /* document cookie */)
421 431
422 // Run a nested message loop in the renderer until print preview for 432 // Run a nested message loop in the renderer until print preview for
423 // window.print() finishes. 433 // window.print() finishes.
424 IPC_SYNC_MESSAGE_ROUTED1_0(PrintHostMsg_ScriptedPrintPreview, 434 IPC_SYNC_MESSAGE_ROUTED1_0(PrintHostMsg_ScriptedPrintPreview,
425 bool /* is_modifiable */) 435 bool /* is_modifiable */)
426 436
427 // Notify the browser that the PDF in the initiator renderer has disabled print 437 // Notify the browser that the PDF in the initiator renderer has disabled print
428 // scaling option. 438 // scaling option.
429 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled) 439 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc ('k') | chrome/common/print_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698