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

Side by Side Diff: printing/metafile.h

Issue 2458513003: Addressing C4267 warnings for printing. (Closed)
Patch Set: Rebase, IsValueInRangeForNumericType for CFIndex Created 4 years, 1 month 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
« no previous file with comments | « printing/emf_win_unittest.cc ('k') | printing/pdf_metafile_cg_mac.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_METAFILE_H_ 5 #ifndef PRINTING_METAFILE_H_
6 #define PRINTING_METAFILE_H_ 6 #define PRINTING_METAFILE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Initializes a fresh new metafile for rendering. Returns false on failure. 108 // Initializes a fresh new metafile for rendering. Returns false on failure.
109 // Note: It should only be called from within the renderer process to allocate 109 // Note: It should only be called from within the renderer process to allocate
110 // rendering resources. 110 // rendering resources.
111 virtual bool Init() = 0; 111 virtual bool Init() = 0;
112 112
113 // Initializes the metafile with the data in |src_buffer|. Returns true 113 // Initializes the metafile with the data in |src_buffer|. Returns true
114 // on success. 114 // on success.
115 // Note: It should only be called from within the browser process. 115 // Note: It should only be called from within the browser process.
116 virtual bool InitFromData(const void* src_buffer, 116 virtual bool InitFromData(const void* src_buffer,
117 uint32_t src_buffer_size) = 0; 117 size_t src_buffer_size) = 0;
118 118
119 // Prepares a context for rendering a new page with the given |page_size|, 119 // Prepares a context for rendering a new page with the given |page_size|,
120 // |content_area| and a |scale_factor| to use for the drawing. The units are 120 // |content_area| and a |scale_factor| to use for the drawing. The units are
121 // in points (=1/72 in). 121 // in points (=1/72 in).
122 virtual void StartPage(const gfx::Size& page_size, 122 virtual void StartPage(const gfx::Size& page_size,
123 const gfx::Rect& content_area, 123 const gfx::Rect& content_area,
124 const float& scale_factor) = 0; 124 const float& scale_factor) = 0;
125 125
126 // Closes the current page and destroys the context used in rendering that 126 // Closes the current page and destroys the context used in rendering that
127 // page. The results of current page will be appended into the underlying 127 // page. The results of current page will be appended into the underlying
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bool GetDataAsVector(std::vector<char>* buffer) const override; 163 bool GetDataAsVector(std::vector<char>* buffer) const override;
164 bool SaveTo(base::File* file) const override; 164 bool SaveTo(base::File* file) const override;
165 165
166 private: 166 private:
167 DISALLOW_COPY_AND_ASSIGN(Metafile); 167 DISALLOW_COPY_AND_ASSIGN(Metafile);
168 }; 168 };
169 169
170 } // namespace printing 170 } // namespace printing
171 171
172 #endif // PRINTING_METAFILE_H_ 172 #endif // PRINTING_METAFILE_H_
OLDNEW
« no previous file with comments | « printing/emf_win_unittest.cc ('k') | printing/pdf_metafile_cg_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698