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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // Remove downloads whose URLs match the |url_filter| and are within | 110 // Remove downloads whose URLs match the |url_filter| and are within |
111 // the given time constraints - after remove_begin (inclusive) and before | 111 // the given time constraints - after remove_begin (inclusive) and before |
112 // remove_end (exclusive). You may pass in null Time values to do an unbounded | 112 // remove_end (exclusive). You may pass in null Time values to do an unbounded |
113 // delete in either direction. | 113 // delete in either direction. |
114 virtual int RemoveDownloadsByURLAndTime( | 114 virtual int RemoveDownloadsByURLAndTime( |
115 const base::Callback<bool(const GURL&)>& url_filter, | 115 const base::Callback<bool(const GURL&)>& url_filter, |
116 base::Time remove_begin, | 116 base::Time remove_begin, |
117 base::Time remove_end) = 0; | 117 base::Time remove_end) = 0; |
118 | 118 |
119 // Remove all downloads will delete all downloads. The number of downloads | |
120 // deleted is returned back to the caller. | |
121 virtual int RemoveAllDownloads() = 0; | |
122 | |
123 // See DownloadUrlParameters for details about controlling the download. | 119 // See DownloadUrlParameters for details about controlling the download. |
124 virtual void DownloadUrl( | 120 virtual void DownloadUrl( |
125 std::unique_ptr<DownloadUrlParameters> parameters) = 0; | 121 std::unique_ptr<DownloadUrlParameters> parameters) = 0; |
126 | 122 |
127 // Allow objects to observe the download creation process. | 123 // Allow objects to observe the download creation process. |
128 virtual void AddObserver(Observer* observer) = 0; | 124 virtual void AddObserver(Observer* observer) = 0; |
129 | 125 |
130 // Remove a download observer from ourself. | 126 // Remove a download observer from ourself. |
131 virtual void RemoveObserver(Observer* observer) = 0; | 127 virtual void RemoveObserver(Observer* observer) = 0; |
132 | 128 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // if you need to keep track of a specific download. (http://crbug.com/593020) | 177 // if you need to keep track of a specific download. (http://crbug.com/593020) |
182 virtual DownloadItem* GetDownload(uint32_t id) = 0; | 178 virtual DownloadItem* GetDownload(uint32_t id) = 0; |
183 | 179 |
184 // Get the download item for |guid|. | 180 // Get the download item for |guid|. |
185 virtual DownloadItem* GetDownloadByGuid(const std::string& guid) = 0; | 181 virtual DownloadItem* GetDownloadByGuid(const std::string& guid) = 0; |
186 }; | 182 }; |
187 | 183 |
188 } // namespace content | 184 } // namespace content |
189 | 185 |
190 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 186 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |