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

Unified Diff: printing/image.cc

Issue 6826027: Connect the right metafiles for print preview on Linux and Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile problems Created 9 years, 8 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 | « printing/image.h ('k') | printing/image_cairo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/image.cc
diff --git a/printing/image.cc b/printing/image.cc
index a7ae67d38e3e5dae93fae13ef9de924508521ba2..062ac891b23406c8bfeb9a44f09acea8d620f739 100644
--- a/printing/image.cc
+++ b/printing/image.cc
@@ -6,9 +6,9 @@
#include "base/file_util.h"
#include "base/md5.h"
-#include "base/memory/scoped_ptr.h"
#include "base/string_number_conversions.h"
-#include "printing/native_metafile_factory.h"
+#include "printing/metafile.h"
+#include "printing/metafile_impl.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/codec/png_codec.h"
@@ -34,7 +34,7 @@ Image::Image(const FilePath& path)
}
}
-Image::Image(const NativeMetafile& metafile)
+Image::Image(const Metafile& metafile)
: row_length_(0),
ignore_alpha_(true) {
LoadMetafile(metafile);
@@ -146,12 +146,10 @@ bool Image::LoadPng(const std::string& compressed) {
bool Image::LoadMetafile(const std::string& data) {
DCHECK(!data.empty());
- scoped_ptr<NativeMetafile> metafile(
- printing::NativeMetafileFactory::CreateFromData(data.data(),
- data.size()));
- if(!metafile.get())
+ printing::NativeMetafile metafile;
+ if (!metafile.InitFromData(data.data(), data.size()))
return false;
- return LoadMetafile(*metafile);
+ return LoadMetafile(metafile);
}
} // namespace printing
« no previous file with comments | « printing/image.h ('k') | printing/image_cairo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698