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_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Closes the print preview dialog. | 140 // Closes the print preview dialog. |
141 void OnClosePrintPreviewDialog(); | 141 void OnClosePrintPreviewDialog(); |
142 | 142 |
143 // Reload the printers list. | 143 // Reload the printers list. |
144 void OnReloadPrintersList(); | 144 void OnReloadPrintersList(); |
145 | 145 |
146 // Notifies the WebUI that the pdf print scaling option is disabled by | 146 // Notifies the WebUI that the pdf print scaling option is disabled by |
147 // default. | 147 // default. |
148 void OnPrintPreviewScalingDisabled(); | 148 void OnPrintPreviewScalingDisabled(); |
149 | 149 |
150 // Manages the global auto-cancel mode used only for testing. | |
151 static void SetAutoCancelForTesting(bool auto_cancel); | |
152 static bool AutoCancelForTesting(); | |
153 | |
154 private: | 150 private: |
155 friend class PrintPreviewHandlerTest; | 151 friend class PrintPreviewHandlerTest; |
156 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); | 152 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); |
157 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); | 153 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); |
158 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 154 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
159 StickyMarginsCustomThenDefault); | 155 StickyMarginsCustomThenDefault); |
160 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 156 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
161 GetLastUsedMarginSettingsCustom); | 157 GetLastUsedMarginSettingsCustom); |
162 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 158 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
163 GetLastUsedMarginSettingsDefault); | 159 GetLastUsedMarginSettingsDefault); |
(...skipping 25 matching lines...) Expand all Loading... |
189 // title. | 185 // title. |
190 string16 initiator_title_; | 186 string16 initiator_title_; |
191 | 187 |
192 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 188 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
193 bool dialog_closed_; | 189 bool dialog_closed_; |
194 | 190 |
195 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 191 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
196 }; | 192 }; |
197 | 193 |
198 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 194 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
OLD | NEW |