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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // default. | 147 // default. |
148 void OnPrintPreviewScalingDisabled(); | 148 void OnPrintPreviewScalingDisabled(); |
149 | 149 |
150 // Creating an instance of this class causes the print preview panel to be | 150 // Creating an instance of this class causes the print preview panel to be |
151 // cancelled as soon as it is brought up, with the number of times this | 151 // cancelled as soon as it is brought up, with the number of times this |
152 // auto-cancel happens recorded. This is used for testing only. | 152 // auto-cancel happens recorded. This is used for testing only. |
153 class ScopedAutoCancelForTesting { | 153 class ScopedAutoCancelForTesting { |
154 public: | 154 public: |
155 ScopedAutoCancelForTesting(); | 155 ScopedAutoCancelForTesting(); |
156 ~ScopedAutoCancelForTesting(); | 156 ~ScopedAutoCancelForTesting(); |
157 static bool IsEnabledForTesting(); | |
158 static void IncrementCountForTesting(); | |
159 int GetCountForTesting(); | 157 int GetCountForTesting(); |
160 }; | 158 }; |
161 | 159 |
162 private: | 160 private: |
163 friend class PrintPreviewHandlerTest; | 161 friend class PrintPreviewHandlerTest; |
164 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); | 162 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); |
165 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); | 163 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); |
166 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 164 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
167 StickyMarginsCustomThenDefault); | 165 StickyMarginsCustomThenDefault); |
168 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 166 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
(...skipping 28 matching lines...) Expand all Loading... |
197 // title. | 195 // title. |
198 string16 initiator_title_; | 196 string16 initiator_title_; |
199 | 197 |
200 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 198 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
201 bool dialog_closed_; | 199 bool dialog_closed_; |
202 | 200 |
203 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 201 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
204 }; | 202 }; |
205 | 203 |
206 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 204 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
OLD | NEW |