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

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

Issue 2426503002: Make printing work better with OOPIF. (Closed)
Patch Set: Fix build, fix some tests Created 4 years, 2 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 IPC_STRUCT_MEMBER(bool, has_selection) 305 IPC_STRUCT_MEMBER(bool, has_selection)
306 IPC_STRUCT_MEMBER(bool, is_scripted) 306 IPC_STRUCT_MEMBER(bool, is_scripted)
307 IPC_STRUCT_MEMBER(bool, is_modifiable) 307 IPC_STRUCT_MEMBER(bool, is_modifiable)
308 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) 308 IPC_STRUCT_MEMBER(printing::MarginType, margin_type)
309 IPC_STRUCT_END() 309 IPC_STRUCT_END()
310 310
311 311
312 // Messages sent from the browser to the renderer. 312 // Messages sent from the browser to the renderer.
313 313
314 #if defined(ENABLE_PRINT_PREVIEW) 314 #if defined(ENABLE_PRINT_PREVIEW)
315 // Tells the render view to initiate print preview for the entire document. 315 // Tells the render frame to initiate print preview for the entire document.
nasko 2016/10/27 20:26:26 nit: s/render frame/RenderFrame/
Lei Zhang 2016/10/28 23:27:10 Done.
316 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */) 316 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* has_selection */)
317 #endif // defined(ENABLE_PRINT_PREVIEW) 317 #endif // defined(ENABLE_PRINT_PREVIEW)
318 318
319 // Tells the render frame to initiate printing or print preview for a particular 319 // Tells the render frame to initiate printing or print preview for a particular
320 // node, depending on which mode the render frame is in. 320 // node, depending on which mode the render frame is in.
321 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) 321 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
322 322
323 #if defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW) 323 #if defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW)
324 // Tells the renderer to print the print preview tab's PDF plugin without 324 // Tells the renderer to print the print preview tab's PDF plugin without
325 // showing the print dialog. (This is the final step in the print preview 325 // showing the print dialog. (This is the final step in the print preview
326 // workflow.) 326 // workflow.)
327 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, 327 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview,
328 base::DictionaryValue /* settings */) 328 base::DictionaryValue /* settings */)
329 #endif // defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW) 329 #endif // defined(ENABLE_BASIC_PRINTING) && defined(ENABLE_PRINT_PREVIEW)
330 330
331 #if defined(ENABLE_BASIC_PRINTING) 331 #if defined(ENABLE_BASIC_PRINTING)
332 // Tells the render view to switch the CSS to print media type, renders every 332 // Tells the render frame to switch the CSS to print media type, renders every
333 // requested pages and switch back the CSS to display media type. 333 // requested pages and switch back the CSS to display media type.
334 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) 334 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages)
335 335
336 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. 336 // Like PrintMsg_PrintPages, but using the print preview document's frame/node.
337 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) 337 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
338 #endif // defined(ENABLE_BASIC_PRINTING) 338 #endif // defined(ENABLE_BASIC_PRINTING)
339 339
340 // Tells the render view that printing is done so it can clean up. 340 // Tells the render frame that printing is done so it can clean up.
341 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, 341 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
342 bool /* success */) 342 bool /* success */)
343 343
344 // Tells the render view whether scripted printing is blocked or not. 344 // Tells the render frame whether printing is enabled or not.
345 IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked, 345 IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */)
346 bool /* blocked */)
347 346
348 #if defined(ENABLE_PRINT_PREVIEW) 347 #if defined(ENABLE_PRINT_PREVIEW)
349 // Tells the render view to switch the CSS to print media type, renders every 348 // Tells the render frame to switch the CSS to print media type, renders every
350 // requested pages for print preview using the given |settings|. This gets 349 // requested pages for print preview using the given |settings|. This gets
351 // called multiple times as the user updates settings. 350 // called multiple times as the user updates settings.
352 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, 351 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview,
353 base::DictionaryValue /* settings */) 352 base::DictionaryValue /* settings */)
354 #endif // defined(ENABLE_PRINT_PREVIEW) 353 #endif // defined(ENABLE_PRINT_PREVIEW)
355 354
356 // Messages sent from the renderer to the browser. 355 // Messages sent from the renderer to the browser.
357 356
358 // Check if printing is enabled.
359 IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_IsPrintingEnabled,
360 bool /* is_enabled */)
361
362 // Tells the browser that the renderer is done calculating the number of 357 // Tells the browser that the renderer is done calculating the number of
363 // rendered pages according to the specified settings. 358 // rendered pages according to the specified settings.
364 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount, 359 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount,
365 int /* rendered document cookie */, 360 int /* rendered document cookie */,
366 int /* number of rendered pages */) 361 int /* number of rendered pages */)
367 362
368 // Sends the document cookie of the current printer query to the browser. 363 // Sends the document cookie of the current printer query to the browser.
369 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDocumentCookie, 364 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDocumentCookie,
370 int /* rendered document cookie */) 365 int /* rendered document cookie */)
371 366
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 470
476 // Tell the browser to show the print preview, when the document is sufficiently 471 // Tell the browser to show the print preview, when the document is sufficiently
477 // loaded such that the renderer can determine whether it is modifiable or not. 472 // loaded such that the renderer can determine whether it is modifiable or not.
478 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, 473 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
479 bool /* is_modifiable */) 474 bool /* is_modifiable */)
480 475
481 // Notify the browser to set print presets based on source PDF document. 476 // Notify the browser to set print presets based on source PDF document.
482 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, 477 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
483 PrintHostMsg_SetOptionsFromDocument_Params /* params */) 478 PrintHostMsg_SetOptionsFromDocument_Params /* params */)
484 #endif // defined(ENABLE_PRINT_PREVIEW) 479 #endif // defined(ENABLE_PRINT_PREVIEW)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698