Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /// Copyright (c) 2011 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 */ | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
// static
dpapad
2011/02/23 00:44:39
Done.
| |
| 10 printing::NativeMetafile* MetafileFactory::GetMetafile(){ | |
| 11 | |
| 12 #if defined(OS_WIN) | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
These can all be of the form: return new printing:
dpapad
2011/02/23 00:44:39
Done.
| |
| 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 | |
|
Avi (use Gerrit)
2011/02/22 19:00:07
unnecessary line
dpapad
2011/02/22 19:29:10
Done.
| |
| 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 |