| 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 |
| 150 private: | 154 private: |
| 151 friend class PrintPreviewHandlerTest; | 155 friend class PrintPreviewHandlerTest; |
| 152 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); | 156 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); |
| 153 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); | 157 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); |
| 154 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 158 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 155 StickyMarginsCustomThenDefault); | 159 StickyMarginsCustomThenDefault); |
| 156 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 160 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 157 GetLastUsedMarginSettingsCustom); | 161 GetLastUsedMarginSettingsCustom); |
| 158 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 162 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 159 GetLastUsedMarginSettingsDefault); | 163 GetLastUsedMarginSettingsDefault); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 185 // title. | 189 // title. |
| 186 string16 initiator_title_; | 190 string16 initiator_title_; |
| 187 | 191 |
| 188 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 192 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
| 189 bool dialog_closed_; | 193 bool dialog_closed_; |
| 190 | 194 |
| 191 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 195 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 192 }; | 196 }; |
| 193 | 197 |
| 194 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 198 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |