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

Unified Diff: chrome/renderer/print_web_view_helper_linux.cc

Issue 8059034: Reland 103021: Printing preview of a PDF on Mac with Skia only previews the last page of the PDF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | chrome/renderer/print_web_view_helper_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper_linux.cc
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index 7d93a841384471bb00f3b60dc8d7d7e6bfbb6a0b..4d03b35b426e0d10a899f624e576b8eebfeac341 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -14,6 +14,7 @@
#include "printing/metafile_impl.h"
#include "printing/metafile_skia_wrapper.h"
#include "printing/page_size_margins.h"
+#include "skia/ext/platform_device.h"
#include "skia/ext/vector_canvas.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
@@ -208,9 +209,8 @@ void PrintWebViewHelper::PrintPageInternal(
// can't be a stack object.
SkRefPtr<skia::VectorCanvas> canvas = new skia::VectorCanvas(device);
canvas->unref(); // SkRefPtr and new both took a reference.
- printing::MetafileSkiaWrapper::SetMetafileOnCanvas(canvas.get(), metafile);
- printing::MetafileSkiaWrapper::SetDraftMode(canvas.get(),
- is_print_ready_metafile_sent_);
+ printing::MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
+ skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
frame->printPage(params.page_number, canvas.get());
if (params.params.display_header_footer) {
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | chrome/renderer/print_web_view_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698