| 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 18 matching lines...) Expand all Loading... |
| 29 struct PdfMetafileSkiaData; | 29 struct PdfMetafileSkiaData; |
| 30 | 30 |
| 31 // This class uses Skia graphics library to generate a PDF document. | 31 // This class uses Skia graphics library to generate a PDF document. |
| 32 class PRINTING_EXPORT PdfMetafileSkia : public Metafile { | 32 class PRINTING_EXPORT PdfMetafileSkia : public Metafile { |
| 33 public: | 33 public: |
| 34 PdfMetafileSkia(); | 34 PdfMetafileSkia(); |
| 35 ~PdfMetafileSkia() override; | 35 ~PdfMetafileSkia() override; |
| 36 | 36 |
| 37 // Metafile methods. | 37 // Metafile methods. |
| 38 bool Init() override; | 38 bool Init() override; |
| 39 bool InitFromData(const void* src_buffer, uint32 src_buffer_size) override; | 39 bool InitFromData(const void* src_buffer, uint32_t src_buffer_size) override; |
| 40 | 40 |
| 41 bool StartPage(const gfx::Size& page_size, | 41 bool StartPage(const gfx::Size& page_size, |
| 42 const gfx::Rect& content_area, | 42 const gfx::Rect& content_area, |
| 43 const float& scale_factor) override; | 43 const float& scale_factor) override; |
| 44 bool FinishPage() override; | 44 bool FinishPage() override; |
| 45 bool FinishDocument() override; | 45 bool FinishDocument() override; |
| 46 | 46 |
| 47 uint32 GetDataSize() const override; | 47 uint32_t GetDataSize() const override; |
| 48 bool GetData(void* dst_buffer, uint32 dst_buffer_size) const override; | 48 bool GetData(void* dst_buffer, uint32_t dst_buffer_size) const override; |
| 49 | 49 |
| 50 gfx::Rect GetPageBounds(unsigned int page_number) const override; | 50 gfx::Rect GetPageBounds(unsigned int page_number) const override; |
| 51 unsigned int GetPageCount() const override; | 51 unsigned int GetPageCount() const override; |
| 52 | 52 |
| 53 gfx::NativeDrawingContext context() const override; | 53 gfx::NativeDrawingContext context() const override; |
| 54 | 54 |
| 55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
| 56 bool Playback(gfx::NativeDrawingContext hdc, | 56 bool Playback(gfx::NativeDrawingContext hdc, |
| 57 const RECT* rect) const override; | 57 const RECT* rect) const override; |
| 58 bool SafePlayback(gfx::NativeDrawingContext hdc) const override; | 58 bool SafePlayback(gfx::NativeDrawingContext hdc) const override; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 scoped_ptr<PdfMetafileSkiaData> data_; | 87 scoped_ptr<PdfMetafileSkiaData> data_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); | 89 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace printing | 92 } // namespace printing |
| 93 | 93 |
| 94 #endif // PRINTING_PDF_METAFILE_SKIA_H_ | 94 #endif // PRINTING_PDF_METAFILE_SKIA_H_ |
| OLD | NEW |