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

Unified Diff: chrome/renderer/print_web_view_helper_win.cc

Issue 6594121: Revert 76553 - Applying factory pattern (through NativeMetafileFactory class)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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_mac.mm ('k') | chrome/renderer/webplugin_delegate_pepper.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
===================================================================
--- chrome/renderer/print_web_view_helper_win.cc (revision 76554)
+++ chrome/renderer/print_web_view_helper_win.cc (working copy)
@@ -8,8 +8,6 @@
#include "base/process_util.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
-#include "printing/native_metafile_factory.h"
-#include "printing/native_metafile.h"
#include "printing/units.h"
#include "skia/ext/vector_canvas.h"
#include "skia/ext/vector_platform_device.h"
@@ -69,8 +67,7 @@
WebFrame* frame) {
// Generate a memory-based metafile. It will use the current screen's DPI.
// Each metafile contains a single page.
- scoped_ptr<printing::NativeMetafile> metafile(
- printing::NativeMetafileFactory::CreateMetafile());
+ scoped_ptr<printing::NativeMetafile> metafile(new printing::NativeMetafile);
metafile->CreateDc(NULL, NULL);
DCHECK(metafile->hdc());
skia::PlatformDevice::InitializeDC(metafile->hdc());
@@ -136,8 +133,7 @@
// PDF backend" work is completed for windows, make changes to replace this
// EMF with PDF metafile.
// http://code.google.com/p/chromium/issues/detail?id=62889
- scoped_ptr<printing::NativeMetafile> metafile(
- printing::NativeMetafileFactory::CreateMetafile());
+ scoped_ptr<printing::NativeMetafile> metafile(new printing::NativeMetafile);
metafile->CreateDc(NULL, NULL);
DCHECK(metafile->hdc());
skia::PlatformDevice::InitializeDC(metafile->hdc());
@@ -262,7 +258,7 @@
NOTREACHED();
scoped_ptr<printing::NativeMetafile> metafile2(
- printing::NativeMetafileFactory::CreateMetafile());
+ new printing::NativeMetafile);
// Page used alpha blend, but printer doesn't support it. Rewrite the
// metafile and flatten out the transparency.
HDC bitmap_dc = CreateCompatibleDC(GetDC(NULL));
« no previous file with comments | « chrome/renderer/print_web_view_helper_mac.mm ('k') | chrome/renderer/webplugin_delegate_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698