| 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> |
| 11 | 11 |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" | 17 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
| 18 #include "printing/features/features.h" |
| 18 | 19 |
| 19 class PrintPreviewDataService; | 20 class PrintPreviewDataService; |
| 20 class PrintPreviewHandler; | 21 class PrintPreviewHandler; |
| 21 struct PrintHostMsg_DidGetPreviewPageCount_Params; | 22 struct PrintHostMsg_DidGetPreviewPageCount_Params; |
| 22 struct PrintHostMsg_RequestPrintPreview_Params; | 23 struct PrintHostMsg_RequestPrintPreview_Params; |
| 23 struct PrintHostMsg_SetOptionsFromDocument_Params; | 24 struct PrintHostMsg_SetOptionsFromDocument_Params; |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 class FilePath; | 27 class FilePath; |
| 27 class RefCountedBytes; | 28 class RefCountedBytes; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 static void GetCurrentPrintPreviewStatus(int32_t preview_ui_id, | 81 static void GetCurrentPrintPreviewStatus(int32_t preview_ui_id, |
| 81 int request_id, | 82 int request_id, |
| 82 bool* cancel); | 83 bool* cancel); |
| 83 | 84 |
| 84 // Returns an id to uniquely identify this PrintPreviewUI. | 85 // Returns an id to uniquely identify this PrintPreviewUI. |
| 85 int32_t GetIDForPrintPreviewUI() const; | 86 int32_t GetIDForPrintPreviewUI() const; |
| 86 | 87 |
| 87 // Notifies the Web UI of a print preview request with |request_id|. | 88 // Notifies the Web UI of a print preview request with |request_id|. |
| 88 void OnPrintPreviewRequest(int request_id); | 89 void OnPrintPreviewRequest(int request_id); |
| 89 | 90 |
| 90 #if defined(ENABLE_BASIC_PRINTING) | 91 #if BUILDFLAG(ENABLE_BASIC_PRINTING) |
| 91 // Notifies the Web UI to show the system dialog. | 92 // Notifies the Web UI to show the system dialog. |
| 92 void OnShowSystemDialog(); | 93 void OnShowSystemDialog(); |
| 93 #endif // ENABLE_BASIC_PRINTING | 94 #endif // ENABLE_BASIC_PRINTING |
| 94 | 95 |
| 95 // Notifies the Web UI about the page count of the request preview. | 96 // Notifies the Web UI about the page count of the request preview. |
| 96 void OnDidGetPreviewPageCount( | 97 void OnDidGetPreviewPageCount( |
| 97 const PrintHostMsg_DidGetPreviewPageCount_Params& params); | 98 const PrintHostMsg_DidGetPreviewPageCount_Params& params); |
| 98 | 99 |
| 99 // Notifies the Web UI of the default page layout according to the currently | 100 // Notifies the Web UI of the default page layout according to the currently |
| 100 // selected printer and page size. | 101 // selected printer and page size. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // title. | 194 // title. |
| 194 base::string16 initiator_title_; | 195 base::string16 initiator_title_; |
| 195 | 196 |
| 196 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 197 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
| 197 bool dialog_closed_; | 198 bool dialog_closed_; |
| 198 | 199 |
| 199 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 200 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 200 }; | 201 }; |
| 201 | 202 |
| 202 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 203 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |