OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PDF_METAFILE_SKIA_H_ | 5 #ifndef PRINTING_PDF_METAFILE_SKIA_H_ |
6 #define PRINTING_PDF_METAFILE_SKIA_H_ | 6 #define PRINTING_PDF_METAFILE_SKIA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 const RECT* rect) const OVERRIDE; | 56 const RECT* rect) const OVERRIDE; |
57 virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const OVERRIDE; | 57 virtual bool SafePlayback(gfx::NativeDrawingContext hdc) const OVERRIDE; |
58 virtual HENHMETAFILE emf() const OVERRIDE; | 58 virtual HENHMETAFILE emf() const OVERRIDE; |
59 #elif defined(OS_MACOSX) | 59 #elif defined(OS_MACOSX) |
60 virtual bool RenderPage(unsigned int page_number, | 60 virtual bool RenderPage(unsigned int page_number, |
61 gfx::NativeDrawingContext context, | 61 gfx::NativeDrawingContext context, |
62 const CGRect rect, | 62 const CGRect rect, |
63 const MacRenderPageParams& params) const OVERRIDE; | 63 const MacRenderPageParams& params) const OVERRIDE; |
64 #endif | 64 #endif |
65 | 65 |
66 #if defined(OS_CHROMEOS) | 66 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
67 virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE; | 67 virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE; |
68 #endif // if defined(OS_CHROMEOS) | 68 #endif // if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
69 | 69 |
70 // Return a new metafile containing just the current page in draft mode. | 70 // Return a new metafile containing just the current page in draft mode. |
71 PdfMetafileSkia* GetMetafileForCurrentPage(); | 71 PdfMetafileSkia* GetMetafileForCurrentPage(); |
72 | 72 |
73 private: | 73 private: |
74 scoped_ptr<PdfMetafileSkiaData> data_; | 74 scoped_ptr<PdfMetafileSkiaData> data_; |
75 | 75 |
76 // True when finish page is outstanding for current page. | 76 // True when finish page is outstanding for current page. |
77 bool page_outstanding_; | 77 bool page_outstanding_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); | 79 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace printing | 82 } // namespace printing |
83 | 83 |
84 #endif // PRINTING_PDF_METAFILE_SKIA_H_ | 84 #endif // PRINTING_PDF_METAFILE_SKIA_H_ |
OLD | NEW |