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

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

Issue 2683653005: Fix WindowdotPrintShouldBringUpPrintPreview (Closed)
Patch Set: Move inits Created 3 years, 10 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 to set print preset options from source PDF. 146 // Notifies the WebUI to set print preset options from source PDF.
147 void OnSetOptionsFromDocument( 147 void OnSetOptionsFromDocument(
148 const PrintHostMsg_SetOptionsFromDocument_Params& params); 148 const PrintHostMsg_SetOptionsFromDocument_Params& params);
149 149
150 // Allows tests to wait until the print preview dialog is loaded. Optionally 150 // Allows tests to wait until the print preview dialog is loaded. Optionally
151 // also instructs the dialog to auto-cancel, which is used for testing only. 151 // also instructs the dialog to auto-cancel, which is used for testing only.
Lei Zhang 2017/02/25 01:33:29 Comment's slightly out of date since we remove IsA
152 class TestingDelegate { 152 class TestingDelegate {
153 public: 153 public:
154 virtual bool IsAutoCancelEnabled() = 0;
155 virtual void DidGetPreviewPageCount(int page_count) = 0; 154 virtual void DidGetPreviewPageCount(int page_count) = 0;
156 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; 155 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0;
157 }; 156 };
158 157
159 static void SetDelegateForTesting(TestingDelegate* delegate); 158 static void SetDelegateForTesting(TestingDelegate* delegate);
160 159
161 // Allows for tests to set a file path to print a PDF to. This also initiates 160 // Allows for tests to set a file path to print a PDF to. This also initiates
162 // the printing without having to click a button on the print preview dialog. 161 // the printing without having to click a button on the print preview dialog.
163 void SetSelectedFileForTesting(const base::FilePath& path); 162 void SetSelectedFileForTesting(const base::FilePath& path);
164 163
(...skipping 29 matching lines...) Expand all
194 // title. 193 // title.
195 base::string16 initiator_title_; 194 base::string16 initiator_title_;
196 195
197 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. 196 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not.
198 bool dialog_closed_; 197 bool dialog_closed_;
199 198
200 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); 199 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
201 }; 200 };
202 201
203 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ 202 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/native_layer.js ('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