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

Unified Diff: chrome/renderer/printing/print_web_view_helper_linux.cc

Issue 23116003: Adds PrintingContext implementation stub for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes some build targets and try bots. Some other nits. Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698