OLD | NEW |
---|---|
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 PRINTER_PRINTING, | 62 PRINTER_PRINTING, |
63 PRINTER_ERROR, | 63 PRINTER_ERROR, |
64 }; | 64 }; |
65 | 65 |
66 MockPrinter(); | 66 MockPrinter(); |
67 ~MockPrinter(); | 67 ~MockPrinter(); |
68 | 68 |
69 // Functions that changes settings of a pseudo printer. | 69 // Functions that changes settings of a pseudo printer. |
70 void ResetPrinter(); | 70 void ResetPrinter(); |
71 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params); | 71 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params); |
72 void UseInvalidSettings(); | |
72 | 73 |
73 // Functions that handles IPC events. | 74 // Functions that handles IPC events. |
74 void GetDefaultPrintSettings(PrintMsg_Print_Params* params); | 75 void GetDefaultPrintSettings(PrintMsg_Print_Params* params); |
75 void ScriptedPrint(int cookie, | 76 void ScriptedPrint(int cookie, |
76 int expected_pages_count, | 77 int expected_pages_count, |
77 bool has_selection, | 78 bool has_selection, |
78 PrintMsg_PrintPages_Params* settings); | 79 PrintMsg_PrintPages_Params* settings); |
79 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params); | 80 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params); |
80 void SetPrintedPagesCount(int cookie, int number_pages); | 81 void SetPrintedPagesCount(int cookie, int number_pages); |
81 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); | 82 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 // Used only in the preview sequence. | 135 // Used only in the preview sequence. |
135 bool is_first_request_; | 136 bool is_first_request_; |
136 int preview_request_id_; | 137 int preview_request_id_; |
137 | 138 |
138 // Used for displaying headers and footers. | 139 // Used for displaying headers and footers. |
139 bool display_header_footer_; | 140 bool display_header_footer_; |
140 string16 date_; | 141 string16 date_; |
141 string16 title_; | 142 string16 title_; |
142 string16 url_; | 143 string16 url_; |
143 | 144 |
145 // Used for generating invalid settings. | |
146 bool use_invalid_settings_; | |
kmadhusu
2011/08/30 02:11:27
initialize this member variable to false.
arthurhsu
2011/08/30 20:43:03
Done.
| |
147 | |
144 std::vector<scoped_refptr<MockPrinterPage> > pages_; | 148 std::vector<scoped_refptr<MockPrinterPage> > pages_; |
145 | 149 |
146 DISALLOW_COPY_AND_ASSIGN(MockPrinter); | 150 DISALLOW_COPY_AND_ASSIGN(MockPrinter); |
147 }; | 151 }; |
148 | 152 |
149 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ | 153 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ |
OLD | NEW |