| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" | 13 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
| 14 | 14 |
| 15 class PrintPreviewDataService; | 15 class PrintPreviewDataService; |
| 16 class PrintPreviewHandler; | 16 class PrintPreviewHandler; |
| 17 struct PrintHostMsg_DidGetPreviewPageCount_Params; | 17 struct PrintHostMsg_DidGetPreviewPageCount_Params; |
| 18 struct PrintHostMsg_RequestPrintPreview_Params; | 18 struct PrintHostMsg_RequestPrintPreview_Params; |
| 19 struct PrintHostMsg_SetOptionsFromDocument_Params; |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class FilePath; | 22 class FilePath; |
| 22 class RefCountedBytes; | 23 class RefCountedBytes; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace gfx { | 26 namespace gfx { |
| 26 class Rect; | 27 class Rect; |
| 27 } | 28 } |
| 28 | 29 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 134 |
| 134 // Hides the print preview dialog. | 135 // Hides the print preview dialog. |
| 135 void OnHidePreviewDialog(); | 136 void OnHidePreviewDialog(); |
| 136 | 137 |
| 137 // Closes the print preview dialog. | 138 // Closes the print preview dialog. |
| 138 void OnClosePrintPreviewDialog(); | 139 void OnClosePrintPreviewDialog(); |
| 139 | 140 |
| 140 // Reload the printers list. | 141 // Reload the printers list. |
| 141 void OnReloadPrintersList(); | 142 void OnReloadPrintersList(); |
| 142 | 143 |
| 143 // Notifies the WebUI that the pdf print scaling option is disabled by | 144 // Notifies the WebUI to set print preset options from source PDF. |
| 144 // default. | 145 void OnSetOptionsFromDocument( |
| 145 void OnPrintPreviewScalingDisabled(); | 146 const PrintHostMsg_SetOptionsFromDocument_Params& params); |
| 146 | 147 |
| 147 // Allows tests to wait until the print preview dialog is loaded. Optionally | 148 // Allows tests to wait until the print preview dialog is loaded. Optionally |
| 148 // also instructs the dialog to auto-cancel, which is used for testing only. | 149 // also instructs the dialog to auto-cancel, which is used for testing only. |
| 149 class TestingDelegate { | 150 class TestingDelegate { |
| 150 public: | 151 public: |
| 151 virtual bool IsAutoCancelEnabled() = 0; | 152 virtual bool IsAutoCancelEnabled() = 0; |
| 152 virtual void DidGetPreviewPageCount(int page_count) = 0; | 153 virtual void DidGetPreviewPageCount(int page_count) = 0; |
| 153 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; | 154 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; |
| 154 }; | 155 }; |
| 155 | 156 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // title. | 198 // title. |
| 198 base::string16 initiator_title_; | 199 base::string16 initiator_title_; |
| 199 | 200 |
| 200 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 201 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
| 201 bool dialog_closed_; | 202 bool dialog_closed_; |
| 202 | 203 |
| 203 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 204 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 204 }; | 205 }; |
| 205 | 206 |
| 206 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 207 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |