Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 base::SharedMemoryHandle /* renderer handle */, | 171 base::SharedMemoryHandle /* renderer handle */, |
| 172 base::SharedMemoryHandle /* browser handle */) | 172 base::SharedMemoryHandle /* browser handle */) |
| 173 #endif | 173 #endif |
| 174 | 174 |
| 175 // Tells the browser that the renderer is done calculating the number of | 175 // Tells the browser that the renderer is done calculating the number of |
| 176 // rendered pages according to the specified settings. | 176 // rendered pages according to the specified settings. |
| 177 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount, | 177 IPC_MESSAGE_ROUTED2(PrintHostMsg_DidGetPrintedPagesCount, |
| 178 int /* rendered document cookie */, | 178 int /* rendered document cookie */, |
| 179 int /* number of rendered pages */) | 179 int /* number of rendered pages */) |
| 180 | 180 |
| 181 // Tells the browser that the print dialog has been shown. | |
| 182 IPC_MESSAGE_ROUTED0(PrintHostMsg_DidShowPrintDialog) | |
|
Lei Zhang
2011/06/21 01:54:46
You can avoid adding a new message, the additional
James Hawkins
2011/06/22 23:47:24
There are several reasons why this doesn't work:
*
| |
| 183 | |
| 181 // Sends back to the browser the rendered "printed page" that was requested by | 184 // Sends back to the browser the rendered "printed page" that was requested by |
| 182 // a ViewMsg_PrintPage message or from scripted printing. The memory handle in | 185 // a ViewMsg_PrintPage message or from scripted printing. The memory handle in |
| 183 // this message is already valid in the browser process. | 186 // this message is already valid in the browser process. |
| 184 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPrintPage, | 187 IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPrintPage, |
| 185 PrintHostMsg_DidPrintPage_Params /* page content */) | 188 PrintHostMsg_DidPrintPage_Params /* page content */) |
| 186 | 189 |
| 187 // The renderer wants to know the default print settings. | 190 // The renderer wants to know the default print settings. |
| 188 IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_GetDefaultPrintSettings, | 191 IPC_SYNC_MESSAGE_ROUTED0_1(PrintHostMsg_GetDefaultPrintSettings, |
| 189 PrintMsg_Print_Params /* default_settings */) | 192 PrintMsg_Print_Params /* default_settings */) |
| 190 | 193 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, | 226 IPC_MESSAGE_ROUTED1(PrintHostMsg_PagesReadyForPreview, |
| 224 PrintHostMsg_DidPreviewDocument_Params /* params */) | 227 PrintHostMsg_DidPreviewDocument_Params /* params */) |
| 225 | 228 |
| 226 // Tell the browser printing failed. | 229 // Tell the browser printing failed. |
| 227 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, | 230 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, |
| 228 int /* document cookie */) | 231 int /* document cookie */) |
| 229 | 232 |
| 230 // Tell the browser print preview failed. | 233 // Tell the browser print preview failed. |
| 231 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, | 234 IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
| 232 int /* document cookie */) | 235 int /* document cookie */) |
| OLD | NEW |