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

Side by Side Diff: android_webview/common/print_messages.h

Issue 54963005: Upstream printing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address code review Created 7 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
joth 2013/11/21 19:38:03 For all the files copied from //chrome can we add
sgurun-gerrit only 2013/11/23 01:49:11 Done.
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "ipc/ipc_message_macros.h" 13 #include "ipc/ipc_message_macros.h"
14 #include "printing/page_size_margins.h" 14 #include "printing/page_size_margins.h"
15 #include "printing/print_job_constants.h" 15 #include "printing/print_job_constants.h"
16 #include "third_party/WebKit/public/web/WebPrintScalingOption.h" 16 #include "third_party/WebKit/public/web/WebPrintScalingOption.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 19
20 #ifndef CHROME_COMMON_PRINT_MESSAGES_H_ 20 #ifndef AW_COMMON_PRINT_MESSAGES_H_
21 #define CHROME_COMMON_PRINT_MESSAGES_H_ 21 #define AW_COMMON_PRINT_MESSAGES_H_
22 22
23 struct PrintMsg_Print_Params { 23 struct PrintMsg_Print_Params {
24 PrintMsg_Print_Params(); 24 PrintMsg_Print_Params();
25 ~PrintMsg_Print_Params(); 25 ~PrintMsg_Print_Params();
26 26
27 // Resets the members of the struct to 0. 27 // Resets the members of the struct to 0.
28 void Reset(); 28 void Reset();
29 29
30 gfx::Size page_size; 30 gfx::Size page_size;
31 gfx::Size content_size; 31 gfx::Size content_size;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 struct PrintHostMsg_RequestPrintPreview_Params { 64 struct PrintHostMsg_RequestPrintPreview_Params {
65 PrintHostMsg_RequestPrintPreview_Params(); 65 PrintHostMsg_RequestPrintPreview_Params();
66 ~PrintHostMsg_RequestPrintPreview_Params(); 66 ~PrintHostMsg_RequestPrintPreview_Params();
67 bool is_modifiable; 67 bool is_modifiable;
68 bool webnode_only; 68 bool webnode_only;
69 bool has_selection; 69 bool has_selection;
70 bool selection_only; 70 bool selection_only;
71 }; 71 };
72 72
73 #endif // CHROME_COMMON_PRINT_MESSAGES_H_ 73 #endif // AW_COMMON_PRINT_MESSAGES_H_
74 74
75 #define IPC_MESSAGE_START PrintMsgStart 75 #define IPC_MESSAGE_START PrintMsgStart
76 76
77 IPC_ENUM_TRAITS(printing::MarginType) 77 IPC_ENUM_TRAITS(printing::MarginType)
78 IPC_ENUM_TRAITS(blink::WebPrintScalingOption) 78 IPC_ENUM_TRAITS(blink::WebPrintScalingOption)
79 79
80 // Parameters for a render request. 80 // Parameters for a render request.
81 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params) 81 IPC_STRUCT_TRAITS_BEGIN(PrintMsg_Print_Params)
82 // Physical size of the page, including non-printable margins, 82 // Physical size of the page, including non-printable margins,
83 // in pixels according to dpi. 83 // in pixels according to dpi.
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 // It's the renderer that controls the printing process when it is generated 360 // It's the renderer that controls the printing process when it is generated
361 // by javascript. This step is about showing UI to the user to select the 361 // by javascript. This step is about showing UI to the user to select the
362 // final print settings. The output parameter is the same as 362 // final print settings. The output parameter is the same as
363 // ViewMsg_PrintPages which is executed implicitly. 363 // ViewMsg_PrintPages which is executed implicitly.
364 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_ScriptedPrint, 364 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_ScriptedPrint,
365 PrintHostMsg_ScriptedPrint_Params, 365 PrintHostMsg_ScriptedPrint_Params,
366 PrintMsg_PrintPages_Params 366 PrintMsg_PrintPages_Params
367 /* settings chosen by the user*/) 367 /* settings chosen by the user*/)
368 368
369 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 369 #if defined(OS_ANDROID)
370 // Asks the browser to create a temporary file for the renderer to fill 370 // Asks the browser to create a temporary file for the renderer to fill
371 // in resulting NativeMetafile in printing. 371 // in resulting NativeMetafile in printing.
372 IPC_SYNC_MESSAGE_CONTROL1_2(PrintHostMsg_AllocateTempFileForPrinting, 372 IPC_SYNC_MESSAGE_ROUTED0_2(PrintHostMsg_AllocateTempFileForPrinting,
373 int /* render_view_id */, 373 base::FileDescriptor /* temp file fd */,
374 base::FileDescriptor /* temp file fd */, 374 int /* fd in browser*/)
375 int /* fd in browser*/) // Used only by Chrome OS. 375 IPC_MESSAGE_ROUTED1(PrintHostMsg_TempFileForPrintingWritten,
376 IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, 376 int /* fd in browser */)
377 int /* render_view_id */,
378 int /* fd in browser */) // Used only by Chrome OS.
379 #endif 377 #endif
380
381 // Asks the browser to do print preview. 378 // Asks the browser to do print preview.
382 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, 379 IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
383 PrintHostMsg_RequestPrintPreview_Params /* params */) 380 PrintHostMsg_RequestPrintPreview_Params /* params */)
384 381
385 // Notify the browser the number of pages in the print preview document. 382 // Notify the browser the number of pages in the print preview document.
386 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, 383 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount,
387 PrintHostMsg_DidGetPreviewPageCount_Params /* params */) 384 PrintHostMsg_DidGetPreviewPageCount_Params /* params */)
388 385
389 // Notify the browser of the default page layout according to the currently 386 // Notify the browser of the default page layout according to the currently
390 // selected printer and page size. 387 // selected printer and page size.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview) 432 IPC_SYNC_MESSAGE_ROUTED0_0(PrintHostMsg_SetupScriptedPrintPreview)
436 433
437 // Tell the browser to show the print preview, when the document is sufficiently 434 // Tell the browser to show the print preview, when the document is sufficiently
438 // loaded such that the renderer can determine whether it is modifiable or not. 435 // loaded such that the renderer can determine whether it is modifiable or not.
439 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, 436 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
440 bool /* is_modifiable */) 437 bool /* is_modifiable */)
441 438
442 // Notify the browser that the PDF in the initiator renderer has disabled print 439 // Notify the browser that the PDF in the initiator renderer has disabled print
443 // scaling option. 440 // scaling option.
444 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled) 441 IPC_MESSAGE_ROUTED0(PrintHostMsg_PrintPreviewScalingDisabled)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698