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 #ifndef METAFILE_FACTORY_H_ | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
PRINTING_NATIVE_METAFILE_FACTORY_H_
dpapad
2011/02/23 00:44:39
Done.
| |
| 6 #define METAFILE_FACTORY_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "printing/native_metafile.h" | |
| 10 | |
| 11 #if defined(OS_WIN) | |
| 12 #include "printing/emf_win.h" | |
| 13 #elif defined(OS_MACOSX) | |
| 14 #include "printing/pdf_metafile_mac.h" | |
| 15 #elif defined(OS_POSIX) | |
| 16 #include "printing/pdf_ps_metafile_cairo.h" | |
| 17 #endif | |
| 18 | |
| 19 namespace printing { | |
| 20 | |
| 21 // This class is used to obtain pointers to NativeMetafile objects. It is the | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
This comment can be improved; most readers will un
dpapad
2011/02/23 00:44:39
Done.
| |
| 22 // only way to initialize such objects since their constructors are private. | |
| 23 class MetafileFactory { | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
NativeMetafileFactory
dpapad
2011/02/23 00:44:39
Done.
| |
| 24 public: | |
| 25 virtual ~MetafileFactory(); | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
Not necessary, as there is currently no way to cre
dpapad
2011/02/23 00:44:39
Done.
| |
| 26 | |
| 27 // This method takes care of returning a pointer to the appropriate | |
| 28 // NativeMetafile object according to the platform. | |
| 29 static printing::NativeMetafile* GetMetafile(); | |
|
vandebo (ex-Chrome)
2011/02/22 22:18:16
Get implies retrieval and not creation. Since thi
dpapad
2011/02/23 00:44:39
Done.
| |
| 30 | |
| 31 #if defined(OS_LINUX) | |
| 32 static printing::NativeMetafile* | |
| 33 GetMetafileFrom(cairo_t* context); | |
| 34 #endif | |
| 35 | |
| 36 private: | |
| 37 MetafileFactory(); | |
| 38 DISALLOW_COPY_AND_ASSIGN(MetafileFactory); | |
| 39 }; | |
| 40 | |
| 41 } // namespace printing | |
| 42 | |
| 43 #endif /* METAFILE_FACTORY_H_ */ | |
| OLD | NEW |