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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "components/printing/common/printing_param_traits_macros.h" | 16 #include "components/printing/common/printing_param_traits_macros.h" |
17 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
18 #include "printing/features/features.h" | 18 #include "printing/features/features.h" |
19 #include "printing/page_range.h" | 19 #include "printing/page_range.h" |
20 #include "printing/page_size_margins.h" | 20 #include "printing/page_size_margins.h" |
21 #include "printing/print_job_constants.h" | 21 #include "printing/print_job_constants.h" |
22 #include "third_party/WebKit/public/web/WebPrintScalingOption.h" | 22 #include "third_party/WebKit/public/web/WebPrintScalingOption.h" |
| 23 #include "ui/gfx/geometry/point.h" |
23 #include "ui/gfx/geometry/rect.h" | 24 #include "ui/gfx/geometry/rect.h" |
24 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" | 25 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
25 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" | 26 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" |
26 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
27 | 28 |
28 // Force multiple inclusion of the param traits file to generate all methods. | 29 // Force multiple inclusion of the param traits file to generate all methods. |
29 #undef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ | 30 #undef COMPONENTS_PRINTING_COMMON_PRINTING_PARAM_TRAITS_MACROS_H_ |
30 | 31 |
31 #ifndef COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 32 #ifndef COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
32 #define COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ | 33 #define COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 IPC_STRUCT_MEMBER(int, document_cookie) | 300 IPC_STRUCT_MEMBER(int, document_cookie) |
300 | 301 |
301 // Page number. | 302 // Page number. |
302 IPC_STRUCT_MEMBER(int, page_number) | 303 IPC_STRUCT_MEMBER(int, page_number) |
303 | 304 |
304 // The size of the page the page author specified. | 305 // The size of the page the page author specified. |
305 IPC_STRUCT_MEMBER(gfx::Size, page_size) | 306 IPC_STRUCT_MEMBER(gfx::Size, page_size) |
306 | 307 |
307 // The printable area the page author specified. | 308 // The printable area the page author specified. |
308 IPC_STRUCT_MEMBER(gfx::Rect, content_area) | 309 IPC_STRUCT_MEMBER(gfx::Rect, content_area) |
| 310 |
| 311 // The physical offsets of the printer in DPI. Used for PS printing. |
| 312 IPC_STRUCT_MEMBER(gfx::Point, physical_offsets) |
| 313 |
309 IPC_STRUCT_END() | 314 IPC_STRUCT_END() |
310 | 315 |
311 // TODO(dgn) Rename *ScriptedPrint messages because they are not called only | 316 // TODO(dgn) Rename *ScriptedPrint messages because they are not called only |
312 // from scripts. | 317 // from scripts. |
313 // Parameters for the IPC message ViewHostMsg_ScriptedPrint | 318 // Parameters for the IPC message ViewHostMsg_ScriptedPrint |
314 IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params) | 319 IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params) |
315 IPC_STRUCT_MEMBER(int, cookie) | 320 IPC_STRUCT_MEMBER(int, cookie) |
316 IPC_STRUCT_MEMBER(int, expected_pages_count) | 321 IPC_STRUCT_MEMBER(int, expected_pages_count) |
317 IPC_STRUCT_MEMBER(bool, has_selection) | 322 IPC_STRUCT_MEMBER(bool, has_selection) |
318 IPC_STRUCT_MEMBER(bool, is_scripted) | 323 IPC_STRUCT_MEMBER(bool, is_scripted) |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 | 487 |
483 // Tell the browser to show the print preview, when the document is sufficiently | 488 // Tell the browser to show the print preview, when the document is sufficiently |
484 // loaded such that the renderer can determine whether it is modifiable or not. | 489 // loaded such that the renderer can determine whether it is modifiable or not. |
485 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, | 490 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, |
486 bool /* is_modifiable */) | 491 bool /* is_modifiable */) |
487 | 492 |
488 // Notify the browser to set print presets based on source PDF document. | 493 // Notify the browser to set print presets based on source PDF document. |
489 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, | 494 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, |
490 PrintHostMsg_SetOptionsFromDocument_Params /* params */) | 495 PrintHostMsg_SetOptionsFromDocument_Params /* params */) |
491 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) | 496 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
OLD | NEW |