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

Side by Side Diff: printing/pdf_metafile_mac.h

Issue 6709009: Stop overloading Init() in NativeMetafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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/native_metafile.h ('k') | printing/pdf_metafile_mac.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_MAC_H_ 5 #ifndef PRINTING_PDF_METAFILE_MAC_H_
6 #define PRINTING_PDF_METAFILE_MAC_H_ 6 #define PRINTING_PDF_METAFILE_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 13 matching lines...) Expand all
24 namespace printing { 24 namespace printing {
25 25
26 // This class creates a graphics context that renders into a PDF data stream. 26 // This class creates a graphics context that renders into a PDF data stream.
27 class PdfMetafile : public NativeMetafile { 27 class PdfMetafile : public NativeMetafile {
28 public: 28 public:
29 29
30 virtual ~PdfMetafile(); 30 virtual ~PdfMetafile();
31 31
32 // NativeMetafile methods. 32 // NativeMetafile methods.
33 virtual bool Init(); 33 virtual bool Init();
34 virtual bool Init(const void* src_buffer, uint32 src_buffer_size); 34 virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size);
35 35
36 virtual CGContextRef StartPage(const gfx::Size& page_size, 36 virtual CGContextRef StartPage(const gfx::Size& page_size,
37 const gfx::Point& content_origin, 37 const gfx::Point& content_origin,
38 const float& scale_factor); 38 const float& scale_factor);
39 virtual bool FinishPage(); 39 virtual bool FinishPage();
40 virtual bool Close(); 40 virtual bool Close();
41 41
42 virtual uint32 GetDataSize() const; 42 virtual uint32 GetDataSize() const;
43 virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const; 43 virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const;
44 44
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DISALLOW_COPY_AND_ASSIGN(PdfMetafile); 85 DISALLOW_COPY_AND_ASSIGN(PdfMetafile);
86 }; 86 };
87 87
88 } // namespace printing 88 } // namespace printing
89 89
90 #endif // PRINTING_PDF_METAFILE_MAC_H_ 90 #endif // PRINTING_PDF_METAFILE_MAC_H_
OLDNEW
« no previous file with comments | « printing/native_metafile.h ('k') | printing/pdf_metafile_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698