| Index: printing/metafile_factory.cc
|
| diff --git a/printing/metafile_factory.cc b/printing/metafile_factory.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f88fb115c35636990455255c090b083264afb30d
|
| --- /dev/null
|
| +++ b/printing/metafile_factory.cc
|
| @@ -0,0 +1,33 @@
|
| +/// Copyright (c) 2010 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.
|
| +
|
| +#include "printing/metafile_factory.h"
|
| +
|
| +namespace printing {
|
| +
|
| +/* static */
|
| +printing::NativeMetafile* MetafileFactory::GetMetafile(){
|
| +
|
| +#if defined(OS_WIN)
|
| + printing::NativeMetafile* metafile_ptr = new printing::Emf;
|
| +#elif defined(OS_MACOSX)
|
| + printing::NativeMetafile* metafile_ptr = new printing::PdfMetafile;
|
| +#elif defined(OS_POSIX)
|
| + printing::NativeMetafile* metafile_ptr = new printing::PdfPsMetafile;
|
| +#endif
|
| +
|
| + return metafile_ptr;
|
| +
|
| +}
|
| +
|
| +#if defined(OS_LINUX)
|
| +/* static */
|
| +printing::NativeMetafile* MetafileFactory::GetMetafileFrom(cairo_t* context){
|
| + printing::NativeMetafile* metafile_ptr =
|
| + printing::PdfPsMetafile::FromCairoContext(context);
|
| + return metafile_ptr;
|
| +}
|
| +#endif
|
| +
|
| +} // namespace printing
|
|
|