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

Side by Side Diff: chrome/renderer/mock_printer.h

Issue 7693017: Removed use of memset with PrintMsg_Print_Params struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New snapshot uploaded Created 9 years, 4 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
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 CHROME_RENDERER_MOCK_PRINTER_H_ 5 #ifndef CHROME_RENDERER_MOCK_PRINTER_H_
6 #define CHROME_RENDERER_MOCK_PRINTER_H_ 6 #define CHROME_RENDERER_MOCK_PRINTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 bool display_header_footer_; 139 bool display_header_footer_;
140 string16 date_; 140 string16 date_;
141 string16 title_; 141 string16 title_;
142 string16 url_; 142 string16 url_;
143 143
144 std::vector<scoped_refptr<MockPrinterPage> > pages_; 144 std::vector<scoped_refptr<MockPrinterPage> > pages_;
145 145
146 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 146 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
147 }; 147 };
148 148
149 // A clone of PrintMsg_Print_Params struct.
150 class PrintMsg_Print_Params_Clone {
151 public:
152 PrintMsg_Print_Params_Clone();
153 ~PrintMsg_Print_Params_Clone();
154
155 // Resets the members of |params| to 0. Checks to see if
156 // PrintMsg_Print_Params and PrintMsg_Print_Params_Clone have identical
157 // member variables.
158 void ResetParams(PrintMsg_Print_Params* params);
159
160 private:
161 gfx::Size page_size_;
162 gfx::Size printable_size_;
163 int margin_top_;
164 int margin_left_;
165 double dpi_;
166 double min_shrink_;
167 double max_shrink_;
168 int desired_dpi_;
169 int document_cookie_;
170 bool selection_only_;
171 bool supports_alpha_blend_;
172 int preview_request_id_;
173 bool is_first_request_;
174 bool display_header_footer_;
175 string16 date_;
176 string16 title_;
177 string16 url_;
178
179 DISALLOW_COPY_AND_ASSIGN(PrintMsg_Print_Params_Clone);
180 };
181
182 // A clone of PrintMsg_PrintPages_Params struct.
183 class PrintMsg_PrintPages_Params_Clone {
184 public:
185 PrintMsg_PrintPages_Params_Clone();
186 ~PrintMsg_PrintPages_Params_Clone();
187
188 // Resets the members of |params| to 0. Checks to see if
189 // PrintMsg_PrintPages_Params and PrintMsg_PrintPages_Params_Clone have
190 // identical member variables.
191 void ResetParams(PrintMsg_PrintPages_Params* params);
192
193 private:
194 PrintMsg_Print_Params_Clone params_;
195 std::vector<int> pages_;
196
197 DISALLOW_COPY_AND_ASSIGN(PrintMsg_PrintPages_Params_Clone);
198 };
199
200 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ 149 #endif // CHROME_RENDERER_MOCK_PRINTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698