OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Notifies the Web UI that initiator tab is closed, so we can disable all the | 89 // Notifies the Web UI that initiator tab is closed, so we can disable all the |
90 // controls that need the initiator tab for generating the preview data. | 90 // controls that need the initiator tab for generating the preview data. |
91 void OnInitiatorTabClosed(); | 91 void OnInitiatorTabClosed(); |
92 | 92 |
93 // Notifies the Web UI that the initiator tab has crashed. | 93 // Notifies the Web UI that the initiator tab has crashed. |
94 void OnInitiatorTabCrashed(); | 94 void OnInitiatorTabCrashed(); |
95 | 95 |
96 // Notifies the Web UI renderer that file selection has been cancelled. | 96 // Notifies the Web UI renderer that file selection has been cancelled. |
97 void OnFileSelectionCancelled(); | 97 void OnFileSelectionCancelled(); |
98 | 98 |
| 99 // Notifies the Web UI that the printer is unavailable or its settings are |
| 100 // invalid. |
| 101 void OnInvalidPrinterSettings(); |
| 102 |
99 private: | 103 private: |
100 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest, | 104 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest, |
101 TitleAfterReload); | 105 TitleAfterReload); |
102 | 106 |
103 // Returns the Singleton instance of the PrintPreviewDataService. | 107 // Returns the Singleton instance of the PrintPreviewDataService. |
104 PrintPreviewDataService* print_preview_data_service(); | 108 PrintPreviewDataService* print_preview_data_service(); |
105 | 109 |
106 base::TimeTicks initial_preview_start_time_; | 110 base::TimeTicks initial_preview_start_time_; |
107 | 111 |
108 // Store the PrintPreviewUI address string. | 112 // Store the PrintPreviewUI address string. |
109 std::string preview_ui_addr_str_; | 113 std::string preview_ui_addr_str_; |
110 | 114 |
111 // Weak pointer to the WebUI handler. | 115 // Weak pointer to the WebUI handler. |
112 PrintPreviewHandler* handler_; | 116 PrintPreviewHandler* handler_; |
113 | 117 |
114 // Store the |initiator_url| in order to display an accurate error message | 118 // Store the |initiator_url| in order to display an accurate error message |
115 // when the initiator tab is closed/crashed. | 119 // when the initiator tab is closed/crashed. |
116 std::string initiator_url_; | 120 std::string initiator_url_; |
117 | 121 |
118 // Store the initiator tab title, used for populating the print preview tab | 122 // Store the initiator tab title, used for populating the print preview tab |
119 // title. | 123 // title. |
120 string16 initiator_tab_title_; | 124 string16 initiator_tab_title_; |
121 | 125 |
122 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 126 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
123 }; | 127 }; |
124 | 128 |
125 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 129 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
OLD | NEW |