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

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

Issue 7550022: Print Preview: Fixing behavior of event listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.cc ('k') | chrome/renderer/mock_printer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/values.h" 8 #include "base/values.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Cookie for the document to ensure correctness. 43 // Cookie for the document to ensure correctness.
44 IPC_STRUCT_MEMBER(int, document_cookie) 44 IPC_STRUCT_MEMBER(int, document_cookie)
45 45
46 // Should only print currently selected text. 46 // Should only print currently selected text.
47 IPC_STRUCT_MEMBER(bool, selection_only) 47 IPC_STRUCT_MEMBER(bool, selection_only)
48 48
49 // Does the printer support alpha blending? 49 // Does the printer support alpha blending?
50 IPC_STRUCT_MEMBER(bool, supports_alpha_blend) 50 IPC_STRUCT_MEMBER(bool, supports_alpha_blend)
51 51
52 // The id of the preview request, used only for print preview.
52 IPC_STRUCT_MEMBER(int, preview_request_id) 53 IPC_STRUCT_MEMBER(int, preview_request_id)
54
55 // True if this is the first preview request, used only for print preview.
56 IPC_STRUCT_MEMBER(bool, is_first_request)
53 IPC_STRUCT_END() 57 IPC_STRUCT_END()
54 58
55 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params) 59 IPC_STRUCT_BEGIN(PrintMsg_PrintPage_Params)
56 // Parameters to render the page as a printed page. It must always be the same 60 // Parameters to render the page as a printed page. It must always be the same
57 // value for all the document. 61 // value for all the document.
58 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params) 62 IPC_STRUCT_MEMBER(PrintMsg_Print_Params, params)
59 63
60 // The page number is the indicator of the square that should be rendered 64 // The page number is the indicator of the square that should be rendered
61 // according to the layout specified in PrintMsg_Print_Params. 65 // according to the layout specified in PrintMsg_Print_Params.
62 IPC_STRUCT_MEMBER(int, page_number) 66 IPC_STRUCT_MEMBER(int, page_number)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewPage_Params) 104 IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewPage_Params)
101 // A shared memory handle to metafile data for a draft document of the page. 105 // A shared memory handle to metafile data for a draft document of the page.
102 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) 106 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
103 107
104 // Size of metafile data. 108 // Size of metafile data.
105 IPC_STRUCT_MEMBER(uint32, data_size) 109 IPC_STRUCT_MEMBER(uint32, data_size)
106 110
107 // |page_number| is zero-based and can be |printing::INVALID_PAGE_INDEX| if it 111 // |page_number| is zero-based and can be |printing::INVALID_PAGE_INDEX| if it
108 // is just a check. 112 // is just a check.
109 IPC_STRUCT_MEMBER(int, page_number) 113 IPC_STRUCT_MEMBER(int, page_number)
114
115 // The id of the preview request.
116 IPC_STRUCT_MEMBER(int, preview_request_id)
117 IPC_STRUCT_END()
118
119 // Parameters sent along with the page count.
120 IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
121 // Cookie for the document to ensure correctness.
122 IPC_STRUCT_MEMBER(int, document_cookie)
123
124 // Total page count.
125 IPC_STRUCT_MEMBER(int, page_count)
126
127 // Indicates whether the previewed document is modifiable.
128 IPC_STRUCT_MEMBER(bool, is_modifiable)
129
130 // The id of the preview request.
131 IPC_STRUCT_MEMBER(int, preview_request_id)
110 IPC_STRUCT_END() 132 IPC_STRUCT_END()
111 133
112 // Parameters to describe a rendered page. 134 // Parameters to describe a rendered page.
113 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params) 135 IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
114 // A shared memory handle to the EMF data. This data can be quite large so a 136 // A shared memory handle to the EMF data. This data can be quite large so a
115 // memory map needs to be used. 137 // memory map needs to be used.
116 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) 138 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
117 139
118 // Size of the metafile data. 140 // Size of the metafile data.
119 IPC_STRUCT_MEMBER(uint32, data_size) 141 IPC_STRUCT_MEMBER(uint32, data_size)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 base::FileDescriptor /* temp file fd */, 274 base::FileDescriptor /* temp file fd */,
253 int /* fd in browser*/) 275 int /* fd in browser*/)
254 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, 276 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten,
255 int /* fd in browser */) 277 int /* fd in browser */)
256 #endif 278 #endif
257 279
258 // Asks the browser to do print preview. 280 // Asks the browser to do print preview.
259 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) 281 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview)
260 282
261 // Notify the browser the number of pages in the print preview document. 283 // Notify the browser the number of pages in the print preview document.
262 IPC_MESSAGE_ROUTED3(PrintHostMsg_DidGetPreviewPageCount, 284 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount,
263 int /* document cookie */, 285 PrintHostMsg_DidGetPreviewPageCount_Params /* params */)
264 int /* page count */,
265 bool /* is modifiable */)
266 286
267 // Notify the browser a print preview page has been rendered. 287 // Notify the browser a print preview page has been rendered.
268 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, 288 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage,
269 PrintHostMsg_DidPreviewPage_Params /* params */) 289 PrintHostMsg_DidPreviewPage_Params /* params */)
270 290
271 // Sends back to the browser the complete rendered document for print preview 291 // Sends back to the browser the complete rendered document for print preview
272 // that was requested by a PrintMsg_PrintPreview message. The memory handle in 292 // that was requested by a PrintMsg_PrintPreview message. The memory handle in
273 // this message is already valid in the browser process. 293 // this message is already valid in the browser process.
274 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, 294 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview,
275 PrintHostMsg_DidPreviewDocument_Params /* params */) 295 PrintHostMsg_DidPreviewDocument_Params /* params */)
276 296
277 // Tell the browser printing failed. 297 // Tell the browser printing failed.
278 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, 298 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
279 int /* document cookie */) 299 int /* document cookie */)
280 300
281 // Tell the browser print preview failed. 301 // Tell the browser print preview failed.
282 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, 302 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
283 int /* document cookie */) 303 int /* document cookie */)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.cc ('k') | chrome/renderer/mock_printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698