| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Notifies the Web UI that the initiator tab has crashed. | 101 // Notifies the Web UI that the initiator tab has crashed. |
| 102 void OnInitiatorTabCrashed(); | 102 void OnInitiatorTabCrashed(); |
| 103 | 103 |
| 104 // Notifies the Web UI renderer that file selection has been cancelled. | 104 // Notifies the Web UI renderer that file selection has been cancelled. |
| 105 void OnFileSelectionCancelled(); | 105 void OnFileSelectionCancelled(); |
| 106 | 106 |
| 107 // Notifies the Web UI to cancel the pending preview request. | 107 // Notifies the Web UI to cancel the pending preview request. |
| 108 void OnCancelPendingPreviewRequest(); | 108 void OnCancelPendingPreviewRequest(); |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 112 ActivateInitiatorTabOnPrint); |
| 111 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest, | 113 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest, |
| 112 TitleAfterReload); | 114 TitleAfterReload); |
| 113 | 115 |
| 114 // Returns the Singleton instance of the PrintPreviewDataService. | 116 // Returns the Singleton instance of the PrintPreviewDataService. |
| 115 PrintPreviewDataService* print_preview_data_service(); | 117 PrintPreviewDataService* print_preview_data_service(); |
| 116 | 118 |
| 117 base::TimeTicks initial_preview_start_time_; | 119 base::TimeTicks initial_preview_start_time_; |
| 118 | 120 |
| 119 // Store the PrintPreviewUI address string. | 121 // Store the PrintPreviewUI address string. |
| 120 std::string preview_ui_addr_str_; | 122 std::string preview_ui_addr_str_; |
| 121 | 123 |
| 122 // Weak pointer to the WebUI handler. | 124 // Weak pointer to the WebUI handler. |
| 123 PrintPreviewHandler* handler_; | 125 PrintPreviewHandler* handler_; |
| 124 | 126 |
| 125 // Store the |initiator_url| in order to display an accurate error message | 127 // Store the |initiator_url| in order to display an accurate error message |
| 126 // when the initiator tab is closed/crashed. | 128 // when the initiator tab is closed/crashed. |
| 127 std::string initiator_url_; | 129 std::string initiator_url_; |
| 128 | 130 |
| 129 // Store the initiator tab title, used for populating the print preview tab | 131 // Store the initiator tab title, used for populating the print preview tab |
| 130 // title. | 132 // title. |
| 131 string16 initiator_tab_title_; | 133 string16 initiator_tab_title_; |
| 132 | 134 |
| 133 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 135 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 138 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |