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

Unified Diff: chrome/utility/utility_thread.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/renderer/print_web_view_helper_win.cc ('k') | printing/emf_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/utility_thread.cc
diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc
index d9fd576e19ff48cd675a298321c45d45cf2d3d2a..91b157400b6302ca184cce8f76bf610fee745779 100644
--- a/chrome/utility/utility_thread.cc
+++ b/chrome/utility/utility_thread.cc
@@ -263,12 +263,12 @@ bool UtilityThread::RenderPDFToWinMetafile(
// Since we created the metafile using the screen DPI (but we actually want
// the PDF DLL to print using the passed in render_dpi, we apply the following
// transformation.
- SetGraphicsMode(metafile->hdc(), GM_ADVANCED);
+ SetGraphicsMode(metafile->context(), GM_ADVANCED);
XFORM xform = {0};
int screen_dpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSX);
xform.eM11 = xform.eM22 =
static_cast<float>(screen_dpi) / static_cast<float>(render_dpi);
- ModifyWorldTransform(metafile->hdc(), &xform, MWT_LEFTMULTIPLY);
+ ModifyWorldTransform(metafile->context(), &xform, MWT_LEFTMULTIPLY);
bool ret = false;
std::vector<printing::PageRange>::const_iterator iter;
@@ -278,16 +278,16 @@ bool UtilityThread::RenderPDFToWinMetafile(
break;
metafile->StartPage();
if (render_proc(&buffer.front(), buffer.size(), page_number,
- metafile->hdc(), render_dpi, render_dpi,
+ metafile->context(), render_dpi, render_dpi,
render_area.x(), render_area.y(), render_area.width(),
render_area.height(), true, false, true, true))
if (*highest_rendered_page_number < page_number)
*highest_rendered_page_number = page_number;
ret = true;
- metafile->EndPage();
+ metafile->FinishPage();
}
}
- metafile->CloseDc();
+ metafile->Close();
return ret;
}
#endif // defined(OS_WIN)
« no previous file with comments | « chrome/renderer/print_web_view_helper_win.cc ('k') | printing/emf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698