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

Side by Side Diff: components/printing/common/print_messages.h

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 years, 8 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool supports_alpha_blend; 54 bool supports_alpha_blend;
55 int32_t preview_ui_id; 55 int32_t preview_ui_id;
56 int preview_request_id; 56 int preview_request_id;
57 bool is_first_request; 57 bool is_first_request;
58 blink::WebPrintScalingOption print_scaling_option; 58 blink::WebPrintScalingOption print_scaling_option;
59 bool print_to_pdf; 59 bool print_to_pdf;
60 bool display_header_footer; 60 bool display_header_footer;
61 base::string16 title; 61 base::string16 title;
62 base::string16 url; 62 base::string16 url;
63 bool should_print_backgrounds; 63 bool should_print_backgrounds;
64 bool is_subframe;
64 }; 65 };
65 66
66 struct PrintMsg_PrintPages_Params { 67 struct PrintMsg_PrintPages_Params {
67 PrintMsg_PrintPages_Params(); 68 PrintMsg_PrintPages_Params();
68 PrintMsg_PrintPages_Params(const PrintMsg_PrintPages_Params& other); 69 PrintMsg_PrintPages_Params(const PrintMsg_PrintPages_Params& other);
69 ~PrintMsg_PrintPages_Params(); 70 ~PrintMsg_PrintPages_Params();
70 71
71 // Resets the members of the struct to 0. 72 // Resets the members of the struct to 0.
72 void Reset(); 73 void Reset();
73 74
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 IPC_STRUCT_TRAITS_MEMBER(display_header_footer) 164 IPC_STRUCT_TRAITS_MEMBER(display_header_footer)
164 165
165 // Title string to be printed as header if requested by the user. 166 // Title string to be printed as header if requested by the user.
166 IPC_STRUCT_TRAITS_MEMBER(title) 167 IPC_STRUCT_TRAITS_MEMBER(title)
167 168
168 // URL string to be printed as footer if requested by the user. 169 // URL string to be printed as footer if requested by the user.
169 IPC_STRUCT_TRAITS_MEMBER(url) 170 IPC_STRUCT_TRAITS_MEMBER(url)
170 171
171 // True if print backgrounds is requested by the user. 172 // True if print backgrounds is requested by the user.
172 IPC_STRUCT_TRAITS_MEMBER(should_print_backgrounds) 173 IPC_STRUCT_TRAITS_MEMBER(should_print_backgrounds)
174
175 // True if this is for printing a subframe for composition.
176 IPC_STRUCT_TRAITS_MEMBER(is_subframe)
173 IPC_STRUCT_TRAITS_END() 177 IPC_STRUCT_TRAITS_END()
174 178
175 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) 179 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params)
176 // Parameters to render the page as a printed page. It must always be the same 180 // Parameters to render the page as a printed page. It must always be the same
177 // value for all the document. 181 // value for all the document.
178 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) 182 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params)
179 183
180 // The page number is the indicator of the square that should be rendered 184 // The page number is the indicator of the square that should be rendered
181 // according to the layout specified in PrintMsg_Print_Params. 185 // according to the layout specified in PrintMsg_Print_Params.
182 IPC_STRUCT_MEMBER(int, page_number) 186 IPC_STRUCT_MEMBER(int, page_number)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 IPC_STRUCT_MEMBER(int, document_cookie) 245 IPC_STRUCT_MEMBER(int, document_cookie)
242 246
243 // Store the expected pages count. 247 // Store the expected pages count.
244 IPC_STRUCT_MEMBER(int, expected_pages_count) 248 IPC_STRUCT_MEMBER(int, expected_pages_count)
245 249
246 // Whether the preview can be modified. 250 // Whether the preview can be modified.
247 IPC_STRUCT_MEMBER(bool, modifiable) 251 IPC_STRUCT_MEMBER(bool, modifiable)
248 252
249 // The id of the preview request. 253 // The id of the preview request.
250 IPC_STRUCT_MEMBER(int, preview_request_id) 254 IPC_STRUCT_MEMBER(int, preview_request_id)
255
256 // Whether this is for a subframe
257 IPC_STRUCT_MEMBER(bool, is_subframe)
251 IPC_STRUCT_END() 258 IPC_STRUCT_END()
252 259
253 // Parameters to describe a rendered preview page. 260 // Parameters to describe a rendered preview page.
254 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewPage_Params) 261 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewPage_Params)
255 // A shared memory handle to metafile data for a draft document of the page. 262 // A shared memory handle to metafile data for a draft document of the page.
256 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) 263 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
257 264
258 // Size of metafile data. 265 // Size of metafile data.
259 IPC_STRUCT_MEMBER(uint32_t, data_size) 266 IPC_STRUCT_MEMBER(uint32_t, data_size)
260 267
261 // |page_number| is zero-based and should not be negative. 268 // |page_number| is zero-based and should not be negative.
262 IPC_STRUCT_MEMBER(int, page_number) 269 IPC_STRUCT_MEMBER(int, page_number)
263 270
264 // The id of the preview request. 271 // The id of the preview request.
265 IPC_STRUCT_MEMBER(int, preview_request_id) 272 IPC_STRUCT_MEMBER(int, preview_request_id)
273
274 // Whether this is for a subframe
275 IPC_STRUCT_MEMBER(bool, is_subframe)
266 IPC_STRUCT_END() 276 IPC_STRUCT_END()
267 277
268 // Parameters sent along with the page count. 278 // Parameters sent along with the page count.
269 IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params) 279 IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
270 // Cookie for the document to ensure correctness. 280 // Cookie for the document to ensure correctness.
271 IPC_STRUCT_MEMBER(int, document_cookie) 281 IPC_STRUCT_MEMBER(int, document_cookie)
272 282
273 // Total page count. 283 // Total page count.
274 IPC_STRUCT_MEMBER(int, page_count) 284 IPC_STRUCT_MEMBER(int, page_count)
275 285
(...skipping 28 matching lines...) Expand all
304 314
305 // The size of the page the page author specified. 315 // The size of the page the page author specified.
306 IPC_STRUCT_MEMBER(gfx::Size, page_size) 316 IPC_STRUCT_MEMBER(gfx::Size, page_size)
307 317
308 // The printable area the page author specified. 318 // The printable area the page author specified.
309 IPC_STRUCT_MEMBER(gfx::Rect, content_area) 319 IPC_STRUCT_MEMBER(gfx::Rect, content_area)
310 320
311 // The physical offsets of the printer in DPI. Used for PS printing. 321 // The physical offsets of the printer in DPI. Used for PS printing.
312 IPC_STRUCT_MEMBER(gfx::Point, physical_offsets) 322 IPC_STRUCT_MEMBER(gfx::Point, physical_offsets)
313 323
324 // Whether this is for a subframe.
325 IPC_STRUCT_MEMBER(bool, is_subframe)
314 IPC_STRUCT_END() 326 IPC_STRUCT_END()
315 327
316 // TODO(dgn) Rename *ScriptedPrint messages because they are not called only 328 // TODO(dgn) Rename *ScriptedPrint messages because they are not called only
317 // from scripts. 329 // from scripts.
318 // Parameters for the IPC message ViewHostMsg_ScriptedPrint 330 // Parameters for the IPC message ViewHostMsg_ScriptedPrint
319 IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params) 331 IPC_STRUCT_BEGIN(PrintHostMsg_ScriptedPrint_Params)
320 IPC_STRUCT_MEMBER(int, cookie) 332 IPC_STRUCT_MEMBER(int, cookie)
321 IPC_STRUCT_MEMBER(int, expected_pages_count) 333 IPC_STRUCT_MEMBER(int, expected_pages_count)
322 IPC_STRUCT_MEMBER(bool, has_selection) 334 IPC_STRUCT_MEMBER(bool, has_selection)
323 IPC_STRUCT_MEMBER(bool, is_scripted) 335 IPC_STRUCT_MEMBER(bool, is_scripted)
(...skipping 19 matching lines...) Expand all
343 // workflow.) 355 // workflow.)
344 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, 356 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview,
345 base::DictionaryValue /* settings */) 357 base::DictionaryValue /* settings */)
346 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 358 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
347 359
348 #if BUILDFLAG(ENABLE_BASIC_PRINTING) 360 #if BUILDFLAG(ENABLE_BASIC_PRINTING)
349 // Tells the RenderFrame to switch the CSS to print media type, renders every 361 // Tells the RenderFrame to switch the CSS to print media type, renders every
350 // requested pages and switch back the CSS to display media type. 362 // requested pages and switch back the CSS to display media type.
351 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) 363 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages)
352 364
365 // Similar as PrintMsg_PrintPages except use preset setttings passed in.
366 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPagesWithSettings, gfx::Rect /* size */)
367
353 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. 368 // Like PrintMsg_PrintPages, but using the print preview document's frame/node.
354 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) 369 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
355 #endif 370 #endif
356 371
357 // Tells the RenderFrame that printing is done so it can clean up. 372 // Tells the RenderFrame that printing is done so it can clean up.
358 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, 373 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
359 bool /* success */) 374 bool /* success */)
360 375
361 // Tells the RenderFrame whether printing is enabled or not. 376 // Tells the RenderFrame whether printing is enabled or not.
362 IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) 377 IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) 501 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview)
487 502
488 // Tell the browser to show the print preview, when the document is sufficiently 503 // Tell the browser to show the print preview, when the document is sufficiently
489 // loaded such that the renderer can determine whether it is modifiable or not. 504 // loaded such that the renderer can determine whether it is modifiable or not.
490 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, 505 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
491 bool /* is_modifiable */) 506 bool /* is_modifiable */)
492 507
493 // Notify the browser to set print presets based on source PDF document. 508 // Notify the browser to set print presets based on source PDF document.
494 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, 509 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
495 PrintHostMsg_SetOptionsFromDocument_Params /* params */) 510 PrintHostMsg_SetOptionsFromDocument_Params /* params */)
511
496 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) 512 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | components/printing/common/print_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698