Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: chrome/browser/ui/webui/print_preview_ui.h

Issue 7799019: Print Preview: Add a test for activating the initiator tab on print. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: reinterpret_cast -> static_cast Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Notifies the Web UI that the initiator tab has crashed. 96 // Notifies the Web UI that the initiator tab has crashed.
97 void OnInitiatorTabCrashed(); 97 void OnInitiatorTabCrashed();
98 98
99 // Notifies the Web UI renderer that file selection has been cancelled. 99 // Notifies the Web UI renderer that file selection has been cancelled.
100 void OnFileSelectionCancelled(); 100 void OnFileSelectionCancelled();
101 101
102 // Notifies the Web UI to cancel the pending preview request. 102 // Notifies the Web UI to cancel the pending preview request.
103 void OnCancelPendingPreviewRequest(); 103 void OnCancelPendingPreviewRequest();
104 104
105 private: 105 private:
106 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest,
107 ActivateInitiatorTabOnPrint);
106 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest, 108 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest,
107 TitleAfterReload); 109 TitleAfterReload);
108 110
109 // Returns the Singleton instance of the PrintPreviewDataService. 111 // Returns the Singleton instance of the PrintPreviewDataService.
110 PrintPreviewDataService* print_preview_data_service(); 112 PrintPreviewDataService* print_preview_data_service();
111 113
112 base::TimeTicks initial_preview_start_time_; 114 base::TimeTicks initial_preview_start_time_;
113 115
114 // Store the PrintPreviewUI address string. 116 // Store the PrintPreviewUI address string.
115 std::string preview_ui_addr_str_; 117 std::string preview_ui_addr_str_;
116 118
117 // Weak pointer to the WebUI handler. 119 // Weak pointer to the WebUI handler.
118 PrintPreviewHandler* handler_; 120 PrintPreviewHandler* handler_;
119 121
120 // Store the |initiator_url| in order to display an accurate error message 122 // Store the |initiator_url| in order to display an accurate error message
121 // when the initiator tab is closed/crashed. 123 // when the initiator tab is closed/crashed.
122 std::string initiator_url_; 124 std::string initiator_url_;
123 125
124 // Store the initiator tab title, used for populating the print preview tab 126 // Store the initiator tab title, used for populating the print preview tab
125 // title. 127 // title.
126 string16 initiator_tab_title_; 128 string16 initiator_tab_title_;
127 129
128 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); 130 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
129 }; 131 };
130 132
131 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ 133 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698