Index: chrome/renderer/printing/print_web_view_helper_linux.cc |
diff --git a/chrome/renderer/printing/print_web_view_helper_linux.cc b/chrome/renderer/printing/print_web_view_helper_linux.cc |
index 3bdf60c5cb2b5c020c6921c8dce2a9af9cc658fd..312acd2d832ce0f8e5048f1458768b7d7a978a9f 100644 |
--- a/chrome/renderer/printing/print_web_view_helper_linux.cc |
+++ b/chrome/renderer/printing/print_web_view_helper_linux.cc |
@@ -4,10 +4,8 @@ |
#include "chrome/renderer/printing/print_web_view_helper.h" |
-#include "base/file_descriptor_posix.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/metrics/histogram.h" |
#include "chrome/common/print_messages.h" |
#include "content/public/renderer/render_thread.h" |
#include "printing/metafile.h" |
@@ -18,9 +16,11 @@ |
#include "skia/ext/vector_canvas.h" |
#include "third_party/WebKit/public/web/WebFrame.h" |
-#if !defined(OS_CHROMEOS) |
+#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
#include "base/process/process_handle.h" |
-#endif // !defined(OS_CHROMEOS) |
+#else |
+#include "base/file_descriptor_posix.h" |
+#endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
namespace printing { |
@@ -101,12 +101,14 @@ bool PrintWebViewHelper::PrintPagesNative(WebKit::WebFrame* frame, |
uint32 buf_size = metafile.GetDataSize(); |
DCHECK_GT(buf_size, 0u); |
-#if defined(OS_CHROMEOS) |
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
int sequence_number = -1; |
base::FileDescriptor fd; |
// Ask the browser to open a file for us. |
- Send(new PrintHostMsg_AllocateTempFileForPrinting(&fd, &sequence_number)); |
+ Send(new PrintHostMsg_AllocateTempFileForPrinting(routing_id(), |
+ &fd, |
+ &sequence_number)); |
if (!metafile.SaveToFD(fd)) |
return false; |