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

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

Issue 2510753002: Revert of Make printing work better with OOPIF. (Closed)
Patch Set: Created 4 years, 1 month 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 IPC_STRUCT_MEMBER(bool, has_selection) 313 IPC_STRUCT_MEMBER(bool, has_selection)
314 IPC_STRUCT_MEMBER(bool, is_scripted) 314 IPC_STRUCT_MEMBER(bool, is_scripted)
315 IPC_STRUCT_MEMBER(bool, is_modifiable) 315 IPC_STRUCT_MEMBER(bool, is_modifiable)
316 IPC_STRUCT_MEMBER(printing::MarginType, margin_type) 316 IPC_STRUCT_MEMBER(printing::MarginType, margin_type)
317 IPC_STRUCT_END() 317 IPC_STRUCT_END()
318 318
319 319
320 // Messages sent from the browser to the renderer. 320 // Messages sent from the browser to the renderer.
321 321
322 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 322 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
323 // Tells the RenderFrame to initiate print preview for the entire document. 323 // Tells the render view to initiate print preview for the entire document.
324 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* has_selection */) 324 IPC_MESSAGE_ROUTED1(PrintMsg_InitiatePrintPreview, bool /* selection_only */)
325 #endif 325 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
326 326
327 // Tells the RenderFrame to initiate printing or print preview for a particular 327 // Tells the render frame to initiate printing or print preview for a particular
328 // node, depending on which mode the RenderFrame is in. 328 // node, depending on which mode the render frame is in.
329 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) 329 IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
330 330
331 #if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 331 #if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
332 // Tells the renderer to print the print preview tab's PDF plugin without 332 // Tells the renderer to print the print preview tab's PDF plugin without
333 // showing the print dialog. (This is the final step in the print preview 333 // showing the print dialog. (This is the final step in the print preview
334 // workflow.) 334 // workflow.)
335 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview, 335 IPC_MESSAGE_ROUTED1(PrintMsg_PrintForPrintPreview,
336 base::DictionaryValue /* settings */) 336 base::DictionaryValue /* settings */)
337 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 337 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
338 338
339 #if BUILDFLAG(ENABLE_BASIC_PRINTING) 339 #if BUILDFLAG(ENABLE_BASIC_PRINTING)
340 // Tells the RenderFrame to switch the CSS to print media type, renders every 340 // Tells the render view to switch the CSS to print media type, renders every
341 // requested pages and switch back the CSS to display media type. 341 // requested pages and switch back the CSS to display media type.
342 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages) 342 IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages)
343 343
344 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. 344 // Like PrintMsg_PrintPages, but using the print preview document's frame/node.
345 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) 345 IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
346 #endif 346 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
347 347
348 // Tells the RenderFrame that printing is done so it can clean up. 348 // Tells the render view that printing is done so it can clean up.
349 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, 349 IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
350 bool /* success */) 350 bool /* success */)
351 351
352 // Tells the RenderFrame whether printing is enabled or not. 352 // Tells the render view whether scripted printing is blocked or not.
353 IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) 353 IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked,
354 bool /* blocked */)
354 355
355 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 356 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
356 // Tells the RenderFrame to switch the CSS to print media type, renders every 357 // Tells the render view to switch the CSS to print media type, renders every
357 // requested pages for print preview using the given |settings|. This gets 358 // requested pages for print preview using the given |settings|. This gets
358 // called multiple times as the user updates settings. 359 // called multiple times as the user updates settings.
359 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, 360 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview,
360 base::DictionaryValue /* settings */) 361 base::DictionaryValue /* settings */)
361 #endif 362 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
362 363
363 // Messages sent from the renderer to the browser. 364 // Messages sent from the renderer to the browser.
364 365
366 // Check if printing is enabled.
367 IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_IsPrintingEnabled,
368 bool /* is_enabled */)
369
365 // Tells the browser that the renderer is done calculating the number of 370 // Tells the browser that the renderer is done calculating the number of
366 // rendered pages according to the specified settings. 371 // rendered pages according to the specified settings.
367 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount, 372 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount,
368 int /* rendered document cookie */, 373 int /* rendered document cookie */,
369 int /* number of rendered pages */) 374 int /* number of rendered pages */)
370 375
371 // Sends the document cookie of the current printer query to the browser. 376 // Sends the document cookie of the current printer query to the browser.
372 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDocumentCookie, 377 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetDocumentCookie,
373 int /* rendered document cookie */) 378 int /* rendered document cookie */)
374 379
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 483
479 // Tell the browser to show the print preview, when the document is sufficiently 484 // Tell the browser to show the print preview, when the document is sufficiently
480 // loaded such that the renderer can determine whether it is modifiable or not. 485 // loaded such that the renderer can determine whether it is modifiable or not.
481 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, 486 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
482 bool /* is_modifiable */) 487 bool /* is_modifiable */)
483 488
484 // Notify the browser to set print presets based on source PDF document. 489 // Notify the browser to set print presets based on source PDF document.
485 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, 490 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
486 PrintHostMsg_SetOptionsFromDocument_Params /* params */) 491 PrintHostMsg_SetOptionsFromDocument_Params /* params */)
487 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) 492 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
OLDNEW
« no previous file with comments | « components/printing/browser/print_manager.cc ('k') | components/printing/renderer/print_web_view_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698