Index: chrome/common/print_messages.h |
=================================================================== |
--- chrome/common/print_messages.h (revision 97484) |
+++ chrome/common/print_messages.h (working copy) |
@@ -49,10 +49,15 @@ |
// Does the printer support alpha blending? |
IPC_STRUCT_MEMBER(bool, supports_alpha_blend) |
- // The id of the preview request, used only for print preview. |
+ // *** Parameters below are used only for print preview. *** |
+ |
+ // The print preview ui associated with this request. |
+ IPC_STRUCT_MEMBER(std::string, preview_ui_addr) |
+ |
+ // The id of the preview request. |
IPC_STRUCT_MEMBER(int, preview_request_id) |
- // True if this is the first preview request, used only for print preview. |
+ // True if this is the first preview request. |
IPC_STRUCT_MEMBER(bool, is_first_request) |
// Specifies if the header and footer should be rendered. |
@@ -220,16 +225,6 @@ |
// Tells a renderer to stop blocking script initiated printing. |
IPC_MESSAGE_ROUTED0(PrintMsg_ResetScriptedPrintCount) |
-// Tells a renderer to continue generating the print preview. |
-// Use |requested_preview_page_index| to request a specific preview page data. |
-// |requested_preview_page_index| is 1-based or |printing::INVALID_PAGE_INDEX| |
-// to render the next page. |
-IPC_MESSAGE_ROUTED1(PrintMsg_ContinuePreview, |
- int /* requested_preview_page_index */) |
- |
-// Tells a renderer to abort the print preview and reset all state. |
-IPC_MESSAGE_ROUTED0(PrintMsg_AbortPreview) |
- |
// Messages sent from the renderer to the browser. |
#if defined(OS_WIN) |
@@ -300,6 +295,13 @@ |
IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, |
PrintHostMsg_DidPreviewPage_Params /* params */) |
+// Asks the browser whether the print preview has been cancelled, |
+// and if not, what page to render next. |
+IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, |
+ std::string /* print preview ui address */, |
+ int /* request id */, |
+ bool /* print preview cancelled */) |
+ |
// Sends back to the browser the complete rendered document for print preview |
// that was requested by a PrintMsg_PrintPreview message. The memory handle in |
// this message is already valid in the browser process. |
@@ -313,3 +315,7 @@ |
// Tell the browser print preview failed. |
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed, |
int /* document cookie */) |
+ |
+// Tell the browser print preview was cancelled. |
+IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewCancelled, |
+ int /* document cookie */) |