Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: printing/pdf_metafile_cg_mac.h

Issue 568633002: Extracted MetafilePlayer interface from printing::MetafilePlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_expose
Patch Set: Thu Sep 11 16:10:13 PDT 2014 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const float& scale_factor) OVERRIDE; 42 const float& scale_factor) OVERRIDE;
43 virtual bool StartPage(const gfx::Size& page_size, 43 virtual bool StartPage(const gfx::Size& page_size,
44 const gfx::Rect& content_area, 44 const gfx::Rect& content_area,
45 const float& scale_factor) OVERRIDE; 45 const float& scale_factor) OVERRIDE;
46 virtual bool FinishPage() OVERRIDE; 46 virtual bool FinishPage() OVERRIDE;
47 virtual bool FinishDocument() OVERRIDE; 47 virtual bool FinishDocument() OVERRIDE;
48 48
49 virtual uint32 GetDataSize() const OVERRIDE; 49 virtual uint32 GetDataSize() const OVERRIDE;
50 virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE; 50 virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE;
51 51
52 // For testing purposes only.
53 virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
54
55 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; 52 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
56 virtual unsigned int GetPageCount() const OVERRIDE; 53 virtual unsigned int GetPageCount() const OVERRIDE;
57 54
58 // Note: The returned context *must not be retained* past Close(). If it is, 55 // Note: The returned context *must not be retained* past Close(). If it is,
59 // the data returned from GetData will not be valid PDF data. 56 // the data returned from GetData will not be valid PDF data.
60 virtual CGContextRef context() const OVERRIDE; 57 virtual CGContextRef context() const OVERRIDE;
61 58
62 virtual bool RenderPage(unsigned int page_number, 59 virtual bool RenderPage(unsigned int page_number,
63 gfx::NativeDrawingContext context, 60 gfx::NativeDrawingContext context,
64 const CGRect rect, 61 const CGRect rect,
(...skipping 19 matching lines...) Expand all
84 81
85 // Whether this instantiation of the PdfMetafileCg owns the thread_pdf_docs. 82 // Whether this instantiation of the PdfMetafileCg owns the thread_pdf_docs.
86 bool thread_pdf_docs_owned_; 83 bool thread_pdf_docs_owned_;
87 84
88 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg); 85 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg);
89 }; 86 };
90 87
91 } // namespace printing 88 } // namespace printing
92 89
93 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_ 90 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698