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

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

Issue 10168013: [Print Preview] Modified PrepareFrameAndViewPrint class to call the new printBegin function to supp… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 7 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 | « chrome/common/print_messages.cc ('k') | chrome/renderer/mock_printer.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) 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 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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "printing/image.h" 16 #include "printing/image.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintScalingOption .h"
17 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
18 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
19 20
20 struct PrintMsg_Print_Params; 21 struct PrintMsg_Print_Params;
21 struct PrintMsg_PrintPages_Params; 22 struct PrintMsg_PrintPages_Params;
22 struct PrintHostMsg_DidPrintPage_Params; 23 struct PrintHostMsg_DidPrintPage_Params;
23 24
24 // A class which represents an output page used in the MockPrinter class. 25 // A class which represents an output page used in the MockPrinter class.
25 // The MockPrinter class stores output pages in a vector, so, this class 26 // The MockPrinter class stores output pages in a vector, so, this class
26 // inherits the base::RefCounted<> class so that the MockPrinter class can use 27 // inherits the base::RefCounted<> class so that the MockPrinter class can use
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 137
137 // The output of a printing job. 138 // The output of a printing job.
138 int number_pages_; 139 int number_pages_;
139 int page_number_; 140 int page_number_;
140 141
141 // Used only in the preview sequence. 142 // Used only in the preview sequence.
142 bool is_first_request_; 143 bool is_first_request_;
143 bool print_to_pdf_; 144 bool print_to_pdf_;
144 int preview_request_id_; 145 int preview_request_id_;
145 146
146 // True if we want to fit the html/pdf source to paper size. 147 // Specifies whether to retain/crop/scale source page size to fit the
147 bool fit_to_paper_size_; 148 // given printable area.
149 WebKit::WebPrintScalingOption print_scaling_option_;
148 150
149 // Used for displaying headers and footers. 151 // Used for displaying headers and footers.
150 bool display_header_footer_; 152 bool display_header_footer_;
151 string16 date_; 153 string16 date_;
152 string16 title_; 154 string16 title_;
153 string16 url_; 155 string16 url_;
154 156
155 // Used for generating invalid settings. 157 // Used for generating invalid settings.
156 bool use_invalid_settings_; 158 bool use_invalid_settings_;
157 159
158 std::vector<scoped_refptr<MockPrinterPage> > pages_; 160 std::vector<scoped_refptr<MockPrinterPage> > pages_;
159 161
160 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 162 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
161 }; 163 };
162 164
163 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ 165 #endif // CHROME_RENDERER_MOCK_PRINTER_H_
OLDNEW
« no previous file with comments | « chrome/common/print_messages.cc ('k') | chrome/renderer/mock_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698