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

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

Issue 23054002: Added basic browser test for window.print() from Chrome apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary code that was breaking builds 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
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | 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