OLD | NEW |
(Empty) | |
| 1 /// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "printing/metafile_factory.h" |
| 6 |
| 7 namespace printing { |
| 8 |
| 9 /* static */ |
| 10 printing::NativeMetafile* MetafileFactory::GetMetafile(){ |
| 11 |
| 12 #if defined(OS_WIN) |
| 13 printing::NativeMetafile* metafile_ptr = new printing::Emf; |
| 14 #elif defined(OS_MACOSX) |
| 15 printing::NativeMetafile* metafile_ptr = new printing::PdfMetafile; |
| 16 #elif defined(OS_POSIX) |
| 17 printing::NativeMetafile* metafile_ptr = new printing::PdfPsMetafile; |
| 18 #endif |
| 19 |
| 20 return metafile_ptr; |
| 21 |
| 22 } |
| 23 |
| 24 #if defined(OS_LINUX) |
| 25 /* static */ |
| 26 printing::NativeMetafile* MetafileFactory::GetMetafileFrom(cairo_t* context){ |
| 27 printing::NativeMetafile* metafile_ptr = |
| 28 printing::PdfPsMetafile::FromCairoContext(context); |
| 29 return metafile_ptr; |
| 30 } |
| 31 #endif |
| 32 |
| 33 } // namespace printing |
OLD | NEW |