| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...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 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. |
| 151 // also instructs the dialog to auto-cancel, which is used for testing only. | |
| 152 class TestingDelegate { | 151 class TestingDelegate { |
| 153 public: | 152 public: |
| 154 virtual void DidGetPreviewPageCount(int page_count) = 0; | 153 virtual void DidGetPreviewPageCount(int page_count) = 0; |
| 155 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; | 154 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; |
| 156 }; | 155 }; |
| 157 | 156 |
| 158 static void SetDelegateForTesting(TestingDelegate* delegate); | 157 static void SetDelegateForTesting(TestingDelegate* delegate); |
| 159 | 158 |
| 160 // Allows for tests to set a file path to print a PDF to. This also initiates | 159 // Allows for tests to set a file path to print a PDF to. This also initiates |
| 161 // the printing without having to click a button on the print preview dialog. | 160 // the printing without having to click a button on the print preview dialog. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // title. | 192 // title. |
| 194 base::string16 initiator_title_; | 193 base::string16 initiator_title_; |
| 195 | 194 |
| 196 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 195 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
| 197 bool dialog_closed_; | 196 bool dialog_closed_; |
| 198 | 197 |
| 199 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 198 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 200 }; | 199 }; |
| 201 | 200 |
| 202 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 201 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |