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

Side by Side Diff: chrome/browser/download/download_request_manager.h

Issue 164547: Mac: make save/open dialogs operate as tab-modal sheets.... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Painfully (but hopefully correctly) merged ToT. Created 11 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_DOWNLOAD_DOWNLOAD_REQUEST_MANAGER_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_MANAGER_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_MANAGER_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 status_ = status; 82 status_ = status;
83 } 83 }
84 DownloadRequestManager::DownloadStatus download_status() const { 84 DownloadRequestManager::DownloadStatus download_status() const {
85 return status_; 85 return status_;
86 } 86 }
87 87
88 // Invoked when a user gesture occurs (mouse click, enter or space). This 88 // Invoked when a user gesture occurs (mouse click, enter or space). This
89 // may result in invoking Remove on DownloadRequestManager. 89 // may result in invoking Remove on DownloadRequestManager.
90 void OnUserGesture(); 90 void OnUserGesture();
91 91
92 // Asks the user if they really want to allow the download. 92 // Asks the user if they really want to allow the download. Returns |false|
93 // on error (|true| otherwise).
93 // See description above CanDownloadOnIOThread for details on lifetime of 94 // See description above CanDownloadOnIOThread for details on lifetime of
94 // callback. 95 // callback.
95 void PromptUserForDownload(TabContents* tab, 96 bool PromptUserForDownload(TabContents* tab,
96 DownloadRequestManager::Callback* callback); 97 DownloadRequestManager::Callback* callback);
97 98
98 // Are we showing a prompt to the user? 99 // Are we showing a prompt to the user?
99 bool is_showing_prompt() const { return (dialog_delegate_ != NULL); } 100 bool is_showing_prompt() const { return (dialog_delegate_ != NULL); }
100 101
101 // NavigationController we're tracking. 102 // NavigationController we're tracking.
102 NavigationController* controller() const { return controller_; } 103 NavigationController* controller() const { return controller_; }
103 104
104 // Invoked from DownloadRequestDialogDelegate. Notifies the delegates and 105 // Invoked from DownloadRequestDialogDelegate. Notifies the delegates and
105 // changes the status appropriately. 106 // changes the status appropriately.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // the TabDownloadState is removed and deleted (by way of Remove). 219 // the TabDownloadState is removed and deleted (by way of Remove).
219 typedef std::map<NavigationController*, TabDownloadState*> StateMap; 220 typedef std::map<NavigationController*, TabDownloadState*> StateMap;
220 StateMap state_map_; 221 StateMap state_map_;
221 222
222 static TestingDelegate* delegate_; 223 static TestingDelegate* delegate_;
223 224
224 DISALLOW_COPY_AND_ASSIGN(DownloadRequestManager); 225 DISALLOW_COPY_AND_ASSIGN(DownloadRequestManager);
225 }; 226 };
226 227
227 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_MANAGER_H_ 228 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_request_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698