| OLD | NEW |
| 1 // Copyright (c) 2011 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" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 virtual gfx::NativeDrawingContext context() const OVERRIDE; | 52 virtual gfx::NativeDrawingContext context() const OVERRIDE; |
| 53 | 53 |
| 54 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
| 55 virtual bool Playback(gfx::NativeDrawingContext hdc, | 55 virtual bool Playback(gfx::NativeDrawingContext hdc, |
| 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 CGContextRef context, | 61 gfx::NativeDrawingContext context, |
| 62 const CGRect rect, | 62 const CGRect rect, |
| 63 bool shrink_to_fit, | 63 const MacRenderPageParams& params) const OVERRIDE; |
| 64 bool stretch_to_fit, | |
| 65 bool center_horizontally, | |
| 66 bool center_vertically) const OVERRIDE; | |
| 67 #endif | 64 #endif |
| 68 | 65 |
| 69 #if defined(OS_CHROMEOS) | 66 #if defined(OS_CHROMEOS) |
| 70 virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE; | 67 virtual bool SaveToFD(const base::FileDescriptor& fd) const OVERRIDE; |
| 71 #endif // if defined(OS_CHROMEOS) | 68 #endif // if defined(OS_CHROMEOS) |
| 72 | 69 |
| 73 // 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. |
| 74 PdfMetafileSkia* GetMetafileForCurrentPage(); | 71 PdfMetafileSkia* GetMetafileForCurrentPage(); |
| 75 | 72 |
| 76 private: | 73 private: |
| 77 scoped_ptr<PdfMetafileSkiaData> data_; | 74 scoped_ptr<PdfMetafileSkiaData> data_; |
| 78 | 75 |
| 79 // True when finish page is outstanding for current page. | 76 // True when finish page is outstanding for current page. |
| 80 bool page_outstanding_; | 77 bool page_outstanding_; |
| 81 | 78 |
| 82 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); | 79 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); |
| 83 }; | 80 }; |
| 84 | 81 |
| 85 } // namespace printing | 82 } // namespace printing |
| 86 | 83 |
| 87 #endif // PRINTING_PDF_METAFILE_SKIA_H_ | 84 #endif // PRINTING_PDF_METAFILE_SKIA_H_ |
| OLD | NEW |