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

Unified Diff: chrome/renderer/print_web_view_helper_linux.cc

Issue 6611032: Unifying NativeMetafile class interface (as much as possible) for Linux, Mac, Win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Making virtual methods not virtual (for clang bots) Created 9 years, 9 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/plugin/webplugin_delegate_stub.cc ('k') | chrome/renderer/print_web_view_helper_win.cc » ('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 6771e45431c9b861cc344b282509e990a86ed018..827c61853afe3628440b63c6e7113e0ff031bb55 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -83,7 +83,7 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params,
&sequence_number))) {
return;
}
- if (!metafile->SaveTo(fd))
+ if (!metafile->SaveToFD(fd))
return;
// Tell the browser we've finished writing the file.
@@ -214,12 +214,15 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
&margin_bottom_in_points,
&margin_left_in_points);
+ gfx::Size page_size(
+ content_width_in_points + margin_right_in_points +
+ margin_left_in_points,
+ content_height_in_points + margin_top_in_points +
+ margin_bottom_in_points);
+
cairo_t* cairo_context =
- metafile->StartPage(content_width_in_points,
- content_height_in_points,
+ metafile->StartPage(page_size,
margin_top_in_points,
- margin_right_in_points,
- margin_bottom_in_points,
margin_left_in_points);
if (!cairo_context)
return;
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.cc ('k') | chrome/renderer/print_web_view_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698