summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/print_web_view_helper_win.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 17:20:21 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 17:20:21 +0000
commit7756e5b1e7919fe530ff1ff27503d4893efcee13 (patch)
tree5b7ac359e22bf58e5ae72fbdc57a6b6c92efe285 /chrome/renderer/print_web_view_helper_win.cc
parentf3e9d6e12d38ea05e476899eb2620c57d351f74b (diff)
downloadchromium_src-7756e5b1e7919fe530ff1ff27503d4893efcee13.zip
chromium_src-7756e5b1e7919fe530ff1ff27503d4893efcee13.tar.gz
chromium_src-7756e5b1e7919fe530ff1ff27503d4893efcee13.tar.bz2
Revert 76553 - Applying factory pattern (through NativeMetafileFactory class). It is used to retrieve different printing contexts (based on the platform and user preferences).
BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6544028 TBR=dpapad@chromium.org Review URL: http://codereview.chromium.org/6594121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper_win.cc')
-rw-r--r--chrome/renderer/print_web_view_helper_win.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc
index e0332c8..ccce2e9 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -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 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
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 @@ void PrintWebViewHelper::CreatePreviewDocument(
// 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 @@ void PrintWebViewHelper::RenderPage(
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));