OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "base/shared_memory.h" | 12 #include "base/shared_memory.h" |
13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
14 #include "printing/page_size_margins.h" | 14 #include "printing/page_size_margins.h" |
| 15 #include "printing/print_job_constants.h" |
15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
17 | 18 |
18 #ifndef CHROME_COMMON_PRINT_MESSAGES_H_ | 19 #ifndef CHROME_COMMON_PRINT_MESSAGES_H_ |
19 #define CHROME_COMMON_PRINT_MESSAGES_H_ | 20 #define CHROME_COMMON_PRINT_MESSAGES_H_ |
20 | 21 |
21 struct PrintMsg_Print_Params { | 22 struct PrintMsg_Print_Params { |
22 PrintMsg_Print_Params(); | 23 PrintMsg_Print_Params(); |
23 ~PrintMsg_Print_Params(); | 24 ~PrintMsg_Print_Params(); |
24 | 25 |
(...skipping 28 matching lines...) Expand all Loading... |
53 void Reset(); | 54 void Reset(); |
54 | 55 |
55 PrintMsg_Print_Params params; | 56 PrintMsg_Print_Params params; |
56 std::vector<int> pages; | 57 std::vector<int> pages; |
57 }; | 58 }; |
58 | 59 |
59 #endif // CHROME_COMMON_PRINT_MESSAGES_H_ | 60 #endif // CHROME_COMMON_PRINT_MESSAGES_H_ |
60 | 61 |
61 #define IPC_MESSAGE_START PrintMsgStart | 62 #define IPC_MESSAGE_START PrintMsgStart |
62 | 63 |
| 64 IPC_ENUM_TRAITS(printing::MarginType) |
| 65 |
63 // Parameters for a render request. | 66 // Parameters for a render request. |
64 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) | 67 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) |
65 // Physical size of the page, including non-printable margins, | 68 // Physical size of the page, including non-printable margins, |
66 // in pixels according to dpi. | 69 // in pixels according to dpi. |
67 IPC_STRUCT_TRAITS_MEMBER(page_size) | 70 IPC_STRUCT_TRAITS_MEMBER(page_size) |
68 | 71 |
69 // In pixels according to dpi_x and dpi_y. | 72 // In pixels according to dpi_x and dpi_y. |
70 IPC_STRUCT_TRAITS_MEMBER(printable_size) | 73 IPC_STRUCT_TRAITS_MEMBER(printable_size) |
71 | 74 |
72 // The y-offset of the printable area, in pixels according to dpi. | 75 // The y-offset of the printable area, in pixels according to dpi. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 IPC_STRUCT_MEMBER(gfx::Rect, content_area) | 235 IPC_STRUCT_MEMBER(gfx::Rect, content_area) |
233 IPC_STRUCT_END() | 236 IPC_STRUCT_END() |
234 | 237 |
235 // Parameters for the IPC message ViewHostMsg_ScriptedPrint | 238 // Parameters for the IPC message ViewHostMsg_ScriptedPrint |
236 IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params) | 239 IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params) |
237 IPC_STRUCT_MEMBER(int, routing_id) | 240 IPC_STRUCT_MEMBER(int, routing_id) |
238 IPC_STRUCT_MEMBER(gfx::NativeViewId, host_window_id) | 241 IPC_STRUCT_MEMBER(gfx::NativeViewId, host_window_id) |
239 IPC_STRUCT_MEMBER(int, cookie) | 242 IPC_STRUCT_MEMBER(int, cookie) |
240 IPC_STRUCT_MEMBER(int, expected_pages_count) | 243 IPC_STRUCT_MEMBER(int, expected_pages_count) |
241 IPC_STRUCT_MEMBER(bool, has_selection) | 244 IPC_STRUCT_MEMBER(bool, has_selection) |
242 IPC_STRUCT_MEMBER(bool, use_overlays) | 245 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) |
243 IPC_STRUCT_END() | 246 IPC_STRUCT_END() |
244 | 247 |
245 | 248 |
246 // Messages sent from the browser to the renderer. | 249 // Messages sent from the browser to the renderer. |
247 | 250 |
248 // Tells the render view to initiate print preview for the entire document. | 251 // Tells the render view to initiate print preview for the entire document. |
249 IPC_MESSAGE_ROUTED0(PrintMsg_InitiatePrintPreview) | 252 IPC_MESSAGE_ROUTED0(PrintMsg_InitiatePrintPreview) |
250 | 253 |
251 // Tells the render view to initiate printing or print preview for a particular | 254 // Tells the render view to initiate printing or print preview for a particular |
252 // node, depending on which mode the render view is in. | 255 // node, depending on which mode the render view is in. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 381 |
379 // Tell the browser print preview was cancelled. | 382 // Tell the browser print preview was cancelled. |
380 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled, | 383 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled, |
381 int /* document cookie */) | 384 int /* document cookie */) |
382 | 385 |
383 // Tell the browser print preview found the selected printer has invalid | 386 // Tell the browser print preview found the selected printer has invalid |
384 // settings (which typically caused by disconnected network printer or printer | 387 // settings (which typically caused by disconnected network printer or printer |
385 // driver is bogus). | 388 // driver is bogus). |
386 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewInvalidPrinterSettings, | 389 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewInvalidPrinterSettings, |
387 int /* document cookie */) | 390 int /* document cookie */) |
OLD | NEW |