diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 21:54:06 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 21:54:06 +0000 |
commit | 7d748990b39550c77aa914ba6846885dd7352e10 (patch) | |
tree | 3777582ee9816b3488f218b594db1918e5ebe752 /printing/metafile_impl.h | |
parent | 03e204f307255e8f39aeb002f94b8eb04137e7f9 (diff) | |
download | chromium_src-7d748990b39550c77aa914ba6846885dd7352e10.zip chromium_src-7d748990b39550c77aa914ba6846885dd7352e10.tar.gz chromium_src-7d748990b39550c77aa914ba6846885dd7352e10.tar.bz2 |
Connect the right metafiles for print preview on Linux and Windows.
+ Remove the NativeMetafileFactory since we can't just use preview flag.
+ Update each Metafile constructor site to use PreviewMetafile or NativeMetafileImpl.
+ Fix misc. problems blocking pdf generation on Windows.
+ Rename the metafile interface.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6826027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81161 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/metafile_impl.h')
-rw-r--r-- | printing/metafile_impl.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/printing/metafile_impl.h b/printing/metafile_impl.h new file mode 100644 index 0000000..d25481d --- /dev/null +++ b/printing/metafile_impl.h @@ -0,0 +1,33 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PRINTING_METAFILE_IMPL_H_ +#define PRINTING_METAFILE_IMPL_H_ + +#if defined(OS_WIN) +#include "printing/emf_win.h" +#include "printing/pdf_metafile_skia.h" +#elif defined(OS_MACOSX) +#include "printing/pdf_metafile_cg_mac.h" +#elif defined(OS_POSIX) +#include "printing/pdf_metafile_cairo_linux.h" +#include "printing/pdf_metafile_skia.h" +#endif + +namespace printing { + +#if defined(OS_WIN) +typedef Emf NativeMetafile; +typedef PdfMetafileSkia PreviewMetafile; +#elif defined(OS_MACOSX) +typedef PdfMetafileCg NativeMetafile; +typedef PdfMetafileCg PreviewMetafile; +#elif defined(OS_POSIX) +typedef PdfMetafileCairo NativeMetafile; +typedef PdfMetafileSkia PreviewMetafile; +#endif + +} // namespace printing + +#endif // PRINTING_METAFILE_IMPL_H_ |