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

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

Issue 7365003: Print Preview: Make preview generation event driven to eliminate synchronous messages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Speculative fix for DidFinishPrint DCHECK Created 9 years, 5 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
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Tells the render view to switch the CSS to print media type, renders every 164 // Tells the render view to switch the CSS to print media type, renders every
165 // requested pages for print preview using the given |settings|. This gets 165 // requested pages for print preview using the given |settings|. This gets
166 // called multiple times as the user updates settings. 166 // called multiple times as the user updates settings.
167 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, 167 IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview,
168 DictionaryValue /* settings */) 168 DictionaryValue /* settings */)
169 169
170 // Tells a renderer to stop blocking script initiated printing. 170 // Tells a renderer to stop blocking script initiated printing.
171 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) 171 IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount)
172 172
173 // Tells a renderer to continue generating the print preview.
174 IPC_MESSAGE_ROUTED0(PrintMsg_ContinuePreview)
175
176 // Tells a renderer to cancel the print preview.
177 IPC_MESSAGE_ROUTED0(PrintMsg_CancelPreview)
kmadhusu 2011/07/15 19:25:47 This msg is not used. Please remove this.
Lei Zhang 2011/07/15 20:23:35 Done.
178
179 // Tells a renderer to abort the print preview and reset all state.
180 IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview)
173 181
174 // Messages sent from the renderer to the browser. 182 // Messages sent from the renderer to the browser.
175 183
176 #if defined(OS_WIN) 184 #if defined(OS_WIN)
177 // Duplicates a shared memory handle from the renderer to the browser. Then 185 // Duplicates a shared memory handle from the renderer to the browser. Then
178 // the renderer can flush the handle. 186 // the renderer can flush the handle.
179 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection, 187 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DuplicateSection,
180 base::SharedMemoryHandle /* renderer handle */, 188 base::SharedMemoryHandle /* renderer handle */,
181 base::SharedMemoryHandle /* browser handle */) 189 base::SharedMemoryHandle /* browser handle */)
182 #endif 190 #endif
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 base::FileDescriptor /* temp file fd */, 235 base::FileDescriptor /* temp file fd */,
228 int /* fd in browser*/) 236 int /* fd in browser*/)
229 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten, 237 IPC_MESSAGE_CONTROL1(PrintHostMsg_TempFileForPrintingWritten,
230 int /* fd in browser */) 238 int /* fd in browser */)
231 #endif 239 #endif
232 240
233 // Asks the browser to do print preview. 241 // Asks the browser to do print preview.
234 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview) 242 IPC_MESSAGE_ROUTED0(PrintHostMsg_RequestPrintPreview)
235 243
236 // Notify the browser the number of pages in the print preview document. 244 // Notify the browser the number of pages in the print preview document.
237 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidGetPreviewPageCount, 245 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPreviewPageCount,
246 int /* document cookie */,
238 int /* page count */) 247 int /* page count */)
239 248
240 // Notify the browser a print preview page has been rendered. Give the browser 249 // Notify the browser a print preview page has been rendered. Give the browser
241 // a chance to cancel the print preview as needed. Page number is zero-based, 250 // a chance to cancel the print preview as needed. Page number is zero-based,
242 // and can be -1 if it is just a check. 251 // and can be -1 if it is just a check.
243 IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_DidPreviewPage, 252 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage,
244 int /* page number */, 253 int /* page number */)
245 bool /* print preview cancelled */)
246 254
247 // Sends back to the browser the rendered "printed document" for preview that 255 // Sends back to the browser the complete rendered document for print preview
248 // was requested by a PrintMsg_PrintPreview message. The memory handle in this 256 // that was requested by a PrintMsg_PrintPreview message. The memory handle in
249 // message is already valid in the browser process. 257 // this message is already valid in the browser process.
250 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, 258 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview,
251 PrintHostMsg_DidPreviewDocument_Params /* params */) 259 PrintHostMsg_DidPreviewDocument_Params /* params */)
252 260
253 // Tell the browser printing failed. 261 // Tell the browser printing failed.
254 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, 262 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
255 int /* document cookie */) 263 int /* document cookie */)
256 264
257 // Tell the browser print preview failed. 265 // Tell the browser print preview failed.
258 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, 266 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
259 int /* document cookie */) 267 int /* document cookie */)
260
261 // Tell the browser print preview was cancelled.
262 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled,
263 int /* document cookie */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698