OLD | NEW |
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
25 | 25 |
26 // Force multiple inclusion of the param traits file to generate all methods. | 26 // Force multiple inclusion of the param traits file to generate all methods. |
27 #undef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ | 27 #undef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ |
28 | 28 |
29 #ifndef COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 29 #ifndef COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
30 #define COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 30 #define COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
31 | 31 |
32 struct PrintMsg_Print_Params { | 32 struct PrintMsg_Print_Params { |
33 PrintMsg_Print_Params(); | 33 PrintMsg_Print_Params(); |
| 34 PrintMsg_Print_Params(const PrintMsg_Print_Params& other); |
34 ~PrintMsg_Print_Params(); | 35 ~PrintMsg_Print_Params(); |
35 | 36 |
36 // Resets the members of the struct to 0. | 37 // Resets the members of the struct to 0. |
37 void Reset(); | 38 void Reset(); |
38 | 39 |
39 gfx::Size page_size; | 40 gfx::Size page_size; |
40 gfx::Size content_size; | 41 gfx::Size content_size; |
41 gfx::Rect printable_area; | 42 gfx::Rect printable_area; |
42 int margin_top; | 43 int margin_top; |
43 int margin_left; | 44 int margin_left; |
44 double dpi; | 45 double dpi; |
45 int desired_dpi; | 46 int desired_dpi; |
46 int document_cookie; | 47 int document_cookie; |
47 bool selection_only; | 48 bool selection_only; |
48 bool supports_alpha_blend; | 49 bool supports_alpha_blend; |
49 int32_t preview_ui_id; | 50 int32_t preview_ui_id; |
50 int preview_request_id; | 51 int preview_request_id; |
51 bool is_first_request; | 52 bool is_first_request; |
52 blink::WebPrintScalingOption print_scaling_option; | 53 blink::WebPrintScalingOption print_scaling_option; |
53 bool print_to_pdf; | 54 bool print_to_pdf; |
54 bool display_header_footer; | 55 bool display_header_footer; |
55 base::string16 title; | 56 base::string16 title; |
56 base::string16 url; | 57 base::string16 url; |
57 bool should_print_backgrounds; | 58 bool should_print_backgrounds; |
58 }; | 59 }; |
59 | 60 |
60 struct PrintMsg_PrintPages_Params { | 61 struct PrintMsg_PrintPages_Params { |
61 PrintMsg_PrintPages_Params(); | 62 PrintMsg_PrintPages_Params(); |
| 63 PrintMsg_PrintPages_Params(const PrintMsg_PrintPages_Params& other); |
62 ~PrintMsg_PrintPages_Params(); | 64 ~PrintMsg_PrintPages_Params(); |
63 | 65 |
64 // Resets the members of the struct to 0. | 66 // Resets the members of the struct to 0. |
65 void Reset(); | 67 void Reset(); |
66 | 68 |
67 PrintMsg_Print_Params params; | 69 PrintMsg_Print_Params params; |
68 std::vector<int> pages; | 70 std::vector<int> pages; |
69 }; | 71 }; |
70 | 72 |
71 #if defined(ENABLE_PRINT_PREVIEW) | 73 #if defined(ENABLE_PRINT_PREVIEW) |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 473 |
472 // Tell the browser to show the print preview, when the document is sufficiently | 474 // Tell the browser to show the print preview, when the document is sufficiently |
473 // loaded such that the renderer can determine whether it is modifiable or not. | 475 // loaded such that the renderer can determine whether it is modifiable or not. |
474 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 476 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
475 bool /* is_modifiable */) | 477 bool /* is_modifiable */) |
476 | 478 |
477 // Notify the browser to set print presets based on source PDF document. | 479 // Notify the browser to set print presets based on source PDF document. |
478 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, | 480 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
479 PrintHostMsg_SetOptionsFromDocument_Params /* params */) | 481 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
480 #endif // defined(ENABLE_PRINT_PREVIEW) | 482 #endif // defined(ENABLE_PRINT_PREVIEW) |
OLD | NEW |