| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
| 6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
| 7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
| 8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 DownloadCreateInfo* info, | 222 DownloadCreateInfo* info, |
| 223 const DownloadRequestHandle& request_handle) = 0; | 223 const DownloadRequestHandle& request_handle) = 0; |
| 224 | 224 |
| 225 // Creates a download item for the SavePackage system. | 225 // Creates a download item for the SavePackage system. |
| 226 // Must be called on the UI thread. Note that the DownloadManager | 226 // Must be called on the UI thread. Note that the DownloadManager |
| 227 // retains ownership. | 227 // retains ownership. |
| 228 virtual DownloadItem* CreateSavePackageDownloadItem( | 228 virtual DownloadItem* CreateSavePackageDownloadItem( |
| 229 const FilePath& main_file_path, | 229 const FilePath& main_file_path, |
| 230 const GURL& page_url, | 230 const GURL& page_url, |
| 231 bool is_otr, | 231 bool is_otr, |
| 232 const std::string& mime_type, |
| 232 DownloadItem::Observer* observer) = 0; | 233 DownloadItem::Observer* observer) = 0; |
| 233 | 234 |
| 234 // Clears the last download path, used to initialize "save as" dialogs. | 235 // Clears the last download path, used to initialize "save as" dialogs. |
| 235 virtual void ClearLastDownloadPath() = 0; | 236 virtual void ClearLastDownloadPath() = 0; |
| 236 | 237 |
| 237 // Called by the delegate after the save as dialog is closed. | 238 // Called by the delegate after the save as dialog is closed. |
| 238 virtual void FileSelected(const FilePath& path, int32 download_id) = 0; | 239 virtual void FileSelected(const FilePath& path, int32 download_id) = 0; |
| 239 virtual void FileSelectionCanceled(int32 download_id) = 0; | 240 virtual void FileSelectionCanceled(int32 download_id) = 0; |
| 240 | 241 |
| 241 // Called by the delegate if it delayed the download in | 242 // Called by the delegate if it delayed the download in |
| (...skipping 28 matching lines...) Expand all Loading... |
| 270 private: | 271 private: |
| 271 friend class base::RefCountedThreadSafe< | 272 friend class base::RefCountedThreadSafe< |
| 272 DownloadManager, BrowserThread::DeleteOnUIThread>; | 273 DownloadManager, BrowserThread::DeleteOnUIThread>; |
| 273 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; | 274 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
| 274 friend class base::DeleteHelper<DownloadManager>; | 275 friend class base::DeleteHelper<DownloadManager>; |
| 275 }; | 276 }; |
| 276 | 277 |
| 277 } // namespace content | 278 } // namespace content |
| 278 | 279 |
| 279 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 280 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |