Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.h

Issue 24158002: Cleaned up the print preview API used by app printing browser tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implemented review suggestions Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698