| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PRINTING_NATIVE_METAFILE_H_ | 5 #ifndef PRINTING_NATIVE_METAFILE_H_ |
| 6 #define PRINTING_NATIVE_METAFILE_H_ | 6 #define PRINTING_NATIVE_METAFILE_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 // Define a metafile format for the current platform. We use this platform | 10 // Define a metafile format for the current platform. We use this platform |
| 11 // independent define so we can define interfaces in platform agnostic manner. | 11 // independent define so we can define interfaces in platform agnostic manner. |
| 12 // It is still an outstanding design issue whether we create classes on all | 12 // It is still an outstanding design issue whether we create classes on all |
| 13 // platforms that have the same interface as Emf or if we change Emf to support | 13 // platforms that have the same interface as Emf or if we change Emf to support |
| 14 // multiple platforms (and rename to NativeMetafile). | 14 // multiple platforms (and rename to NativeMetafile). |
| 15 | 15 |
| 16 | 16 |
| 17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 18 | 18 |
| 19 #include "printing/emf_win.h" | 19 #include "printing/emf_win.h" |
| 20 | 20 |
| 21 namespace printing { | 21 namespace printing { |
| 22 | 22 |
| 23 typedef Emf NativeMetafile; | 23 typedef Emf NativeMetafile; |
| 24 | 24 |
| 25 } // namespace printing | 25 } // namespace printing |
| 26 | 26 |
| 27 #elif defined(OS_MACOSX) | 27 #elif defined(OS_MACOSX) |
| 28 | 28 |
| 29 // TODO(port): Printing using PDF? | 29 // TODO(port): Printing using CG/PDF? |
| 30 // The mock class is here so we can compile. | 30 // The mock class is here so we can compile. |
| 31 class NativeMetafile {}; | 31 class NativeMetafile { |
| 32 public: |
| 33 int GetDataSize() const { return 0; } |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(NativeMetafile); |
| 36 }; |
| 32 | 37 |
| 33 #elif defined(OS_LINUX) | 38 #elif defined(OS_LINUX) |
| 34 | 39 |
| 35 #include "printing/pdf_ps_metafile_linux.h" | 40 #include "printing/pdf_ps_metafile_linux.h" |
| 36 | 41 |
| 37 namespace printing { | 42 namespace printing { |
| 38 | 43 |
| 39 typedef PdfPsMetafile NativeMetafile; | 44 typedef PdfPsMetafile NativeMetafile; |
| 40 | 45 |
| 41 } // namespace printing | 46 } // namespace printing |
| 42 | 47 |
| 43 #endif | 48 #endif |
| 44 | 49 |
| 45 | 50 |
| 46 #endif // PRINTING_NATIVE_METAFILE_H_ | 51 #endif // PRINTING_NATIVE_METAFILE_H_ |
| OLD | NEW |