Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // True if we want to fit the html/pdf source to paper size. |
|
vandebo (ex-Chrome)
2012/04/23 21:42:19
nit: Update the comment, true doesn't make sense a
kmadhusu
2012/05/11 21:36:02
Done.
| |
| 147 bool fit_to_paper_size_; | 148 WebKit::WebPrintScalingOption print_scaling_option_; |
| 148 | 149 |
| 149 // Used for displaying headers and footers. | 150 // Used for displaying headers and footers. |
| 150 bool display_header_footer_; | 151 bool display_header_footer_; |
| 151 string16 date_; | 152 string16 date_; |
| 152 string16 title_; | 153 string16 title_; |
| 153 string16 url_; | 154 string16 url_; |
| 154 | 155 |
| 155 // Used for generating invalid settings. | 156 // Used for generating invalid settings. |
| 156 bool use_invalid_settings_; | 157 bool use_invalid_settings_; |
| 157 | 158 |
| 158 std::vector<scoped_refptr<MockPrinterPage> > pages_; | 159 std::vector<scoped_refptr<MockPrinterPage> > pages_; |
| 159 | 160 |
| 160 DISALLOW_COPY_AND_ASSIGN(MockPrinter); | 161 DISALLOW_COPY_AND_ASSIGN(MockPrinter); |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ | 164 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ |
| OLD | NEW |