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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 virtual void AddObserver(Observer* observer) = 0; | 181 virtual void AddObserver(Observer* observer) = 0; |
182 | 182 |
183 // Remove a download observer from ourself. | 183 // Remove a download observer from ourself. |
184 virtual void RemoveObserver(Observer* observer) = 0; | 184 virtual void RemoveObserver(Observer* observer) = 0; |
185 | 185 |
186 // Called by the embedder, after creating the download manager, to let it know | 186 // Called by the embedder, after creating the download manager, to let it know |
187 // about downloads from previous runs of the browser. | 187 // about downloads from previous runs of the browser. |
188 virtual void OnPersistentStoreQueryComplete( | 188 virtual void OnPersistentStoreQueryComplete( |
189 std::vector<DownloadPersistentStoreInfo>* entries) = 0; | 189 std::vector<DownloadPersistentStoreInfo>* entries) = 0; |
190 | 190 |
191 // Called by the embedder, in response to | |
192 // DownloadManagerDelegate::AddItemToPersistentStore. | |
193 virtual void OnItemAddedToPersistentStore(int32 download_id, | |
194 int64 db_handle) = 0; | |
195 | |
196 // The number of in progress (including paused) downloads. | 191 // The number of in progress (including paused) downloads. |
197 virtual int InProgressCount() const = 0; | 192 virtual int InProgressCount() const = 0; |
198 | 193 |
199 virtual BrowserContext* GetBrowserContext() const = 0; | 194 virtual BrowserContext* GetBrowserContext() const = 0; |
200 | 195 |
201 // Checks whether downloaded files still exist. Updates state of downloads | 196 // Checks whether downloaded files still exist. Updates state of downloads |
202 // that refer to removed files. The check runs in the background and may | 197 // that refer to removed files. The check runs in the background and may |
203 // finish asynchronously after this method returns. | 198 // finish asynchronously after this method returns. |
204 virtual void CheckForHistoryFilesRemoval() = 0; | 199 virtual void CheckForHistoryFilesRemoval() = 0; |
205 | 200 |
(...skipping 17 matching lines...) Expand all Loading... |
223 protected: | 218 protected: |
224 virtual ~DownloadManager() {} | 219 virtual ~DownloadManager() {} |
225 | 220 |
226 private: | 221 private: |
227 friend class base::RefCountedThreadSafe<DownloadManager>; | 222 friend class base::RefCountedThreadSafe<DownloadManager>; |
228 }; | 223 }; |
229 | 224 |
230 } // namespace content | 225 } // namespace content |
231 | 226 |
232 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 227 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |