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

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

Issue 7740025: Cancel the pending print preview request when the user request to show the system dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 to cancel the pending preview request.
100 void OnCancelPendingPreviewRequest();
101
99 private: 102 private:
100 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest, 103 FRIEND_TEST_ALL_PREFIXES(PrintPreviewTabControllerUnitTest,
101 TitleAfterReload); 104 TitleAfterReload);
102 105
103 // Returns the Singleton instance of the PrintPreviewDataService. 106 // Returns the Singleton instance of the PrintPreviewDataService.
104 PrintPreviewDataService* print_preview_data_service(); 107 PrintPreviewDataService* print_preview_data_service();
105 108
106 base::TimeTicks initial_preview_start_time_; 109 base::TimeTicks initial_preview_start_time_;
107 110
108 // Store the PrintPreviewUI address string. 111 // Store the PrintPreviewUI address string.
109 std::string preview_ui_addr_str_; 112 std::string preview_ui_addr_str_;
110 113
111 // Weak pointer to the WebUI handler. 114 // Weak pointer to the WebUI handler.
112 PrintPreviewHandler* handler_; 115 PrintPreviewHandler* handler_;
113 116
114 // Store the |initiator_url| in order to display an accurate error message 117 // Store the |initiator_url| in order to display an accurate error message
115 // when the initiator tab is closed/crashed. 118 // when the initiator tab is closed/crashed.
116 std::string initiator_url_; 119 std::string initiator_url_;
117 120
118 // Store the initiator tab title, used for populating the print preview tab 121 // Store the initiator tab title, used for populating the print preview tab
119 // title. 122 // title.
120 string16 initiator_tab_title_; 123 string16 initiator_tab_title_;
121 124
122 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); 125 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
123 }; 126 };
124 127
125 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ 128 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | chrome/browser/ui/webui/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698