| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // Allow objects to observe the download creation process. | 138 // Allow objects to observe the download creation process. |
| 139 virtual void AddObserver(Observer* observer) = 0; | 139 virtual void AddObserver(Observer* observer) = 0; |
| 140 | 140 |
| 141 // Remove a download observer from ourself. | 141 // Remove a download observer from ourself. |
| 142 virtual void RemoveObserver(Observer* observer) = 0; | 142 virtual void RemoveObserver(Observer* observer) = 0; |
| 143 | 143 |
| 144 // Called by the embedder, after creating the download manager, to let it know | 144 // Called by the embedder, after creating the download manager, to let it know |
| 145 // about downloads from previous runs of the browser. | 145 // about downloads from previous runs of the browser. |
| 146 virtual DownloadItem* CreateDownloadItem( | 146 virtual DownloadItem* CreateDownloadItem( |
| 147 const FilePath& current_path, | 147 const base::FilePath& current_path, |
| 148 const FilePath& target_path, | 148 const base::FilePath& target_path, |
| 149 const std::vector<GURL>& url_chain, | 149 const std::vector<GURL>& url_chain, |
| 150 const GURL& referrer_url, | 150 const GURL& referrer_url, |
| 151 const base::Time& start_time, | 151 const base::Time& start_time, |
| 152 const base::Time& end_time, | 152 const base::Time& end_time, |
| 153 int64 received_bytes, | 153 int64 received_bytes, |
| 154 int64 total_bytes, | 154 int64 total_bytes, |
| 155 DownloadItem::DownloadState state, | 155 DownloadItem::DownloadState state, |
| 156 DownloadDangerType danger_type, | 156 DownloadDangerType danger_type, |
| 157 DownloadInterruptReason interrupt_reason, | 157 DownloadInterruptReason interrupt_reason, |
| 158 bool opened) = 0; | 158 bool opened) = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 176 protected: | 176 protected: |
| 177 virtual ~DownloadManager() {} | 177 virtual ~DownloadManager() {} |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 friend class base::RefCountedThreadSafe<DownloadManager>; | 180 friend class base::RefCountedThreadSafe<DownloadManager>; |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 } // namespace content | 183 } // namespace content |
| 184 | 184 |
| 185 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 185 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |