summaryrefslogtreecommitdiffstats
path: root/chrome/utility/utility_thread.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/utility/utility_thread.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/utility/utility_thread.cc')
-rw-r--r--chrome/utility/utility_thread.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc
index 0556cbb..6d078e3 100644
--- a/chrome/utility/utility_thread.cc
+++ b/chrome/utility/utility_thread.cc
@@ -18,6 +18,7 @@
#include "chrome/common/serialized_script_value.h"
#include "chrome/common/utility_messages.h"
#include "chrome/common/web_resource/web_resource_unpacker.h"
+#include "printing/native_metafile.h"
#include "printing/page_range.h"
#include "printing/units.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -28,10 +29,7 @@
#if defined(OS_WIN)
#include "app/win/iat_patch_function.h"
-#include "base/scoped_ptr.h"
#include "base/win/scoped_handle.h"
-#include "printing/native_metafile_factory.h"
-#include "printing/native_metafile.h"
#endif
namespace {
@@ -137,15 +135,10 @@ void UtilityThread::OnRenderPDFPagesToMetafile(
const std::vector<printing::PageRange>& page_ranges) {
bool succeeded = false;
#if defined(OS_WIN)
- scoped_ptr<printing::NativeMetafile> metafile(
- printing::NativeMetafileFactory::CreateMetafile());
+ printing::NativeMetafile metafile;
int highest_rendered_page_number = 0;
- succeeded = RenderPDFToWinMetafile(pdf_file,
- metafile_path,
- render_area,
- render_dpi,
- page_ranges,
- metafile.get(),
+ succeeded = RenderPDFToWinMetafile(pdf_file, metafile_path, render_area,
+ render_dpi, page_ranges, &metafile,
&highest_rendered_page_number);
if (succeeded) {
Send(new UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded(