| 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_CG_MAC_H_ | 5 #ifndef PRINTING_PDF_METAFILE_CG_MAC_H_ |
| 6 #define PRINTING_PDF_METAFILE_CG_MAC_H_ | 6 #define PRINTING_PDF_METAFILE_CG_MAC_H_ |
| 7 | 7 |
| 8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 #include <CoreFoundation/CoreFoundation.h> | 9 #include <CoreFoundation/CoreFoundation.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace printing { | 21 namespace printing { |
| 22 | 22 |
| 23 // This class creates a graphics context that renders into a PDF data stream. | 23 // This class creates a graphics context that renders into a PDF data stream. |
| 24 class PRINTING_EXPORT PdfMetafileCg : public Metafile { | 24 class PRINTING_EXPORT PdfMetafileCg : public Metafile { |
| 25 public: | 25 public: |
| 26 PdfMetafileCg(); | 26 PdfMetafileCg(); |
| 27 ~PdfMetafileCg() override; | 27 ~PdfMetafileCg() override; |
| 28 | 28 |
| 29 // Metafile methods. | 29 // Metafile methods. |
| 30 bool Init() override; | 30 bool Init() override; |
| 31 bool InitFromData(const void* src_buffer, uint32_t src_buffer_size) override; | 31 bool InitFromData(const void* src_buffer, size_t src_buffer_size) override; |
| 32 void StartPage(const gfx::Size& page_size, | 32 void StartPage(const gfx::Size& page_size, |
| 33 const gfx::Rect& content_area, | 33 const gfx::Rect& content_area, |
| 34 const float& scale_factor) override; | 34 const float& scale_factor) override; |
| 35 bool FinishPage() override; | 35 bool FinishPage() override; |
| 36 bool FinishDocument() override; | 36 bool FinishDocument() override; |
| 37 | 37 |
| 38 uint32_t GetDataSize() const override; | 38 uint32_t GetDataSize() const override; |
| 39 bool GetData(void* dst_buffer, uint32_t dst_buffer_size) const override; | 39 bool GetData(void* dst_buffer, uint32_t dst_buffer_size) const override; |
| 40 | 40 |
| 41 gfx::Rect GetPageBounds(unsigned int page_number) const override; | 41 gfx::Rect GetPageBounds(unsigned int page_number) const override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 65 | 65 |
| 66 // Whether or not a page is currently open. | 66 // Whether or not a page is currently open. |
| 67 bool page_is_open_; | 67 bool page_is_open_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg); | 69 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace printing | 72 } // namespace printing |
| 73 | 73 |
| 74 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_ | 74 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_ |
| OLD | NEW |