| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Each download is represented by a DownloadItem, and all DownloadItems | 5 // Each download is represented by a DownloadItem, and all DownloadItems |
| 6 // are owned by the DownloadManager which maintains a global list of all | 6 // are owned by the DownloadManager which maintains a global list of all |
| 7 // downloads. DownloadItems are created when a user initiates a download, | 7 // downloads. DownloadItems are created when a user initiates a download, |
| 8 // and exist for the duration of the browser life time. | 8 // and exist for the duration of the browser life time. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Called when a downloaded file has been opened. | 108 // Called when a downloaded file has been opened. |
| 109 virtual void OnDownloadOpened(DownloadItem* download) = 0; | 109 virtual void OnDownloadOpened(DownloadItem* download) = 0; |
| 110 | 110 |
| 111 protected: | 111 protected: |
| 112 virtual ~Observer() {} | 112 virtual ~Observer() {} |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 // Constructing from persistent store: | 115 // Constructing from persistent store: |
| 116 DownloadItem(DownloadManager* download_manager, | 116 DownloadItem(DownloadManager* download_manager, |
| 117 const DownloadPersistentStoreInfo& info); | 117 const DownloadPersistentStoreInfo& info, |
| 118 int id); |
| 118 | 119 |
| 119 // Constructing for a regular download: | 120 // Constructing for a regular download: |
| 120 DownloadItem(DownloadManager* download_manager, | 121 DownloadItem(DownloadManager* download_manager, |
| 121 const DownloadCreateInfo& info, | 122 const DownloadCreateInfo& info, |
| 122 bool is_otr); | 123 bool is_otr); |
| 123 | 124 |
| 124 // Constructing for the "Save Page As..." feature: | 125 // Constructing for the "Save Page As..." feature: |
| 125 DownloadItem(DownloadManager* download_manager, | 126 DownloadItem(DownloadManager* download_manager, |
| 126 const FilePath& path, | 127 const FilePath& path, |
| 127 const GURL& url, | 128 const GURL& url, |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 // only. | 480 // only. |
| 480 bool open_enabled_; | 481 bool open_enabled_; |
| 481 | 482 |
| 482 // Did the delegate delay calling Complete on this download? | 483 // Did the delegate delay calling Complete on this download? |
| 483 bool delegate_delayed_complete_; | 484 bool delegate_delayed_complete_; |
| 484 | 485 |
| 485 DISALLOW_COPY_AND_ASSIGN(DownloadItem); | 486 DISALLOW_COPY_AND_ASSIGN(DownloadItem); |
| 486 }; | 487 }; |
| 487 | 488 |
| 488 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 489 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
| OLD | NEW |