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

Unified Diff: chrome/renderer/print_web_view_helper_win.cc

Issue 6695013: Cleanup NativeMetafile (win) interface and EMF class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/common/common_param_traits_unittest.cc ('k') | chrome/service/cloud_print/print_system_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_win.cc
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc
index 2e87939b31010ce49d51cba428034fbefbabd59a..941aac7abd88e93a9f83a3a3bdfb9e480e47c6af 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -74,7 +74,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
// Each metafile contains a single page.
scoped_ptr<printing::NativeMetafile> metafile(
printing::NativeMetafileFactory::Create());
- metafile->CreateDc(NULL, NULL);
+ metafile->Init();
DCHECK(metafile->context());
skia::PlatformDevice::InitializeDC(metafile->context());
@@ -111,7 +111,6 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
&(page_params.metafile_data_handle))) {
page_params.data_size = 0;
}
- metafile->CloseEmf();
if (!Send(new ViewHostMsg_DuplicateSection(
routing_id(),
page_params.metafile_data_handle,
@@ -142,7 +141,7 @@ void PrintWebViewHelper::CreatePreviewDocument(
// http://code.google.com/p/chromium/issues/detail?id=62889
scoped_ptr<printing::NativeMetafile> metafile(
printing::NativeMetafileFactory::Create());
- metafile->CreateDc(NULL, NULL);
+ metafile->Init();
DCHECK(metafile->context());
skia::PlatformDevice::InitializeDC(metafile->context());
@@ -184,7 +183,6 @@ void PrintWebViewHelper::CreatePreviewDocument(
preview_params.data_size = 0;
preview_params.expected_pages_count = 0;
}
- metafile->CloseEmf();
if (!Send(new ViewHostMsg_DuplicateSection(
routing_id(),
preview_params.metafile_data_handle,
@@ -263,7 +261,7 @@ void PrintWebViewHelper::RenderPage(
HBRUSH whiteBrush = static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
FillRect(bitmap_dc, &rect, whiteBrush);
- metafile2->CreateDc(NULL, NULL);
+ metafile2->Init();
HDC hdc = metafile2->context();
DCHECK(hdc);
skia::PlatformDevice::InitializeDC(hdc);
« no previous file with comments | « chrome/common/common_param_traits_unittest.cc ('k') | chrome/service/cloud_print/print_system_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698