| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // The number of in progress (including paused) downloads. | 183 // The number of in progress (including paused) downloads. |
| 184 virtual int InProgressCount() const = 0; | 184 virtual int InProgressCount() const = 0; |
| 185 | 185 |
| 186 virtual BrowserContext* GetBrowserContext() const = 0; | 186 virtual BrowserContext* GetBrowserContext() const = 0; |
| 187 | 187 |
| 188 // Checks whether downloaded files still exist. Updates state of downloads | 188 // Checks whether downloaded files still exist. Updates state of downloads |
| 189 // that refer to removed files. The check runs in the background and may | 189 // that refer to removed files. The check runs in the background and may |
| 190 // finish asynchronously after this method returns. | 190 // finish asynchronously after this method returns. |
| 191 virtual void CheckForHistoryFilesRemoval() = 0; | 191 virtual void CheckForHistoryFilesRemoval() = 0; |
| 192 | 192 |
| 193 // Get the download item from the history map. Useful after the item has | |
| 194 // been removed from the active map, or was retrieved from the history DB. | |
| 195 virtual DownloadItem* GetDownloadItem(int id) = 0; | |
| 196 | |
| 197 // Get the download item for |id| if present, no matter what type of download | 193 // Get the download item for |id| if present, no matter what type of download |
| 198 // it is or state it's in. | 194 // it is or state it's in. |
| 199 virtual DownloadItem* GetDownload(int id) = 0; | 195 virtual DownloadItem* GetDownload(int id) = 0; |
| 200 | 196 |
| 201 // Called when Save Page download is done. | 197 // Called when Save Page download is done. |
| 202 virtual void SavePageDownloadFinished(DownloadItem* download) = 0; | 198 virtual void SavePageDownloadFinished(DownloadItem* download) = 0; |
| 203 | 199 |
| 204 // Get the download item from the active map. Useful when the item is not | |
| 205 // yet in the history map. | |
| 206 virtual DownloadItem* GetActiveDownloadItem(int id) = 0; | |
| 207 | |
| 208 protected: | 200 protected: |
| 209 virtual ~DownloadManager() {} | 201 virtual ~DownloadManager() {} |
| 210 | 202 |
| 211 private: | 203 private: |
| 212 friend class base::RefCountedThreadSafe<DownloadManager>; | 204 friend class base::RefCountedThreadSafe<DownloadManager>; |
| 213 }; | 205 }; |
| 214 | 206 |
| 215 } // namespace content | 207 } // namespace content |
| 216 | 208 |
| 217 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 209 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |