Index: android_webview/common/print_messages.h |
diff --git a/chrome/common/print_messages.h b/android_webview/common/print_messages.h |
similarity index 95% |
copy from chrome/common/print_messages.h |
copy to android_webview/common/print_messages.h |
index d4de3ce4f6cd36bebebc1d808b33bf0b512c5d32..bf304284f6758ce4eafd8fe9adbf1d9ae98ca1ad 100644 |
--- a/chrome/common/print_messages.h |
+++ b/android_webview/common/print_messages.h |
@@ -5,6 +5,8 @@ |
// IPC messages for printing. |
// Multiply-included message file, hence no include guard. |
+// TODO(sgurun) copied from chrome/common. Remove after crbug.com/322276 |
+ |
#include <string> |
#include <vector> |
@@ -17,8 +19,8 @@ |
#include "ui/gfx/native_widget_types.h" |
#include "ui/gfx/rect.h" |
-#ifndef CHROME_COMMON_PRINT_MESSAGES_H_ |
-#define CHROME_COMMON_PRINT_MESSAGES_H_ |
+#ifndef AW_COMMON_PRINT_MESSAGES_H_ |
+#define AW_COMMON_PRINT_MESSAGES_H_ |
struct PrintMsg_Print_Params { |
PrintMsg_Print_Params(); |
@@ -70,7 +72,7 @@ struct PrintHostMsg_RequestPrintPreview_Params { |
bool selection_only; |
}; |
-#endif // CHROME_COMMON_PRINT_MESSAGES_H_ |
+#endif // AW_COMMON_PRINT_MESSAGES_H_ |
#define IPC_MESSAGE_START PrintMsgStart |
@@ -183,6 +185,10 @@ IPC_STRUCT_TRAITS_END() |
// Parameters to describe a rendered document. |
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) |
+ // True when we can reuse existing preview data. |metafile_data_handle| and |
+ // |data_size| should not be used when this is true. |
+ IPC_STRUCT_MEMBER(bool, reuse_existing_data) |
+ |
// A shared memory handle to metafile data. |
IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle) |
@@ -362,18 +368,15 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_ScriptedPrint, |
PrintMsg_PrintPages_Params |
/* settings chosen by the user*/) |
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
+#if defined(OS_ANDROID) |
// Asks the browser to create a temporary file for the renderer to fill |
// in resulting NativeMetafile in printing. |
-IPC_SYNC_MESSAGE_CONTROL1_2(PrintHostMsg_AllocateTempFileForPrinting, |
- int /* render_view_id */, |
- base::FileDescriptor /* temp file fd */, |
- int /* fd in browser*/) // Used only by Chrome OS. |
-IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten, |
- int /* render_view_id */, |
- int /* fd in browser */) // Used only by Chrome OS. |
+IPC_SYNC_MESSAGE_ROUTED0_2(PrintHostMsg_AllocateTempFileForPrinting, |
+ base::FileDescriptor /* temp file fd */, |
+ int /* fd in browser*/) |
+IPC_MESSAGE_ROUTED1(PrintHostMsg_TempFileForPrintingWritten, |
+ int /* fd in browser */) |
#endif |
- |
// Asks the browser to do print preview. |
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, |
PrintHostMsg_RequestPrintPreview_Params /* params */) |