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

Side by Side Diff: printing/pdf_metafile_cg_mac.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « printing/metafile.h ('k') | printing/pdf_metafile_skia.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/mac/scoped_cftyperef.h" 13 #include "base/mac/scoped_cftyperef.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "printing/metafile.h" 15 #include "printing/metafile.h"
16 16
17 namespace base {
17 class FilePath; 18 class FilePath;
19 }
18 20
19 namespace gfx { 21 namespace gfx {
20 class Rect; 22 class Rect;
21 class Size; 23 class Size;
22 } 24 }
23 25
24 namespace printing { 26 namespace printing {
25 27
26 // This class creates a graphics context that renders into a PDF data stream. 28 // This class creates a graphics context that renders into a PDF data stream.
27 class PRINTING_EXPORT PdfMetafileCg : public Metafile { 29 class PRINTING_EXPORT PdfMetafileCg : public Metafile {
(...skipping 13 matching lines...) Expand all
41 virtual bool StartPage(const gfx::Size& page_size, 43 virtual bool StartPage(const gfx::Size& page_size,
42 const gfx::Rect& content_area, 44 const gfx::Rect& content_area,
43 const float& scale_factor) OVERRIDE; 45 const float& scale_factor) OVERRIDE;
44 virtual bool FinishPage() OVERRIDE; 46 virtual bool FinishPage() OVERRIDE;
45 virtual bool FinishDocument() OVERRIDE; 47 virtual bool FinishDocument() OVERRIDE;
46 48
47 virtual uint32 GetDataSize() const OVERRIDE; 49 virtual uint32 GetDataSize() const OVERRIDE;
48 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;
49 51
50 // For testing purposes only. 52 // For testing purposes only.
51 virtual bool SaveTo(const FilePath& file_path) const OVERRIDE; 53 virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
52 54
53 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE; 55 virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
54 virtual unsigned int GetPageCount() const OVERRIDE; 56 virtual unsigned int GetPageCount() const OVERRIDE;
55 57
56 // Note: The returned context *must not be retained* past Close(). If it is, 58 // Note: The returned context *must not be retained* past Close(). If it is,
57 // the data returned from GetData will not be valid PDF data. 59 // the data returned from GetData will not be valid PDF data.
58 virtual CGContextRef context() const OVERRIDE; 60 virtual CGContextRef context() const OVERRIDE;
59 61
60 virtual bool RenderPage(unsigned int page_number, 62 virtual bool RenderPage(unsigned int page_number,
61 gfx::NativeDrawingContext context, 63 gfx::NativeDrawingContext context,
(...skipping 20 matching lines...) Expand all
82 84
83 // Whether this instantiation of the PdfMetafileCg owns the thread_pdf_docs. 85 // Whether this instantiation of the PdfMetafileCg owns the thread_pdf_docs.
84 bool thread_pdf_docs_owned_; 86 bool thread_pdf_docs_owned_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg); 88 DISALLOW_COPY_AND_ASSIGN(PdfMetafileCg);
87 }; 89 };
88 90
89 } // namespace printing 91 } // namespace printing
90 92
91 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_ 93 #endif // PRINTING_PDF_METAFILE_CG_MAC_H_
OLDNEW
« no previous file with comments | « printing/metafile.h ('k') | printing/pdf_metafile_skia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698