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 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const CGRect rect, | 64 const CGRect rect, |
65 const MacRenderPageParams& params) const OVERRIDE; | 65 const MacRenderPageParams& params) const OVERRIDE; |
66 | 66 |
67 private: | 67 private: |
68 // Returns a CGPDFDocumentRef version of pdf_data_. | 68 // Returns a CGPDFDocumentRef version of pdf_data_. |
69 CGPDFDocumentRef GetPDFDocument() const; | 69 CGPDFDocumentRef GetPDFDocument() const; |
70 | 70 |
71 base::ThreadChecker thread_checker_; | 71 base::ThreadChecker thread_checker_; |
72 | 72 |
73 // Context for rendering to the pdf. | 73 // Context for rendering to the pdf. |
74 base::mac::ScopedCFTypeRef<CGContextRef> context_; | 74 base::ScopedCFTypeRef<CGContextRef> context_; |
75 | 75 |
76 // PDF backing store. | 76 // PDF backing store. |
77 base::mac::ScopedCFTypeRef<CFMutableDataRef> pdf_data_; | 77 base::ScopedCFTypeRef<CFMutableDataRef> pdf_data_; |
78 | 78 |
79 // Lazily-created CGPDFDocument representation of pdf_data_. | 79 // Lazily-created CGPDFDocument representation of pdf_data_. |
80 mutable base::mac::ScopedCFTypeRef<CGPDFDocumentRef> pdf_doc_; | 80 mutable base::ScopedCFTypeRef<CGPDFDocumentRef> pdf_doc_; |
81 | 81 |
82 // Whether or not a page is currently open. | 82 // Whether or not a page is currently open. |
83 bool page_is_open_; | 83 bool page_is_open_; |
84 | 84 |
85 // Whether this instantiation of the PdfMetafileCg owns the thread_pdf_docs. | 85 // Whether this instantiation of the PdfMetafileCg owns the thread_pdf_docs. |
86 bool thread_pdf_docs_owned_; | 86 bool thread_pdf_docs_owned_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg); | 88 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace printing | 91 } // namespace printing |
92 | 92 |
93 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_ | 93 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_ |
OLD | NEW |