| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 virtual ~DownloadItem(); | 125 virtual ~DownloadItem(); |
| 126 | 126 |
| 127 void AddObserver(Observer* observer); | 127 void AddObserver(Observer* observer); |
| 128 void RemoveObserver(Observer* observer); | 128 void RemoveObserver(Observer* observer); |
| 129 | 129 |
| 130 // Notifies our observers periodically. | 130 // Notifies our observers periodically. |
| 131 void UpdateObservers(); | 131 void UpdateObservers(); |
| 132 | 132 |
| 133 // NotificationObserver implementation. | 133 // NotificationObserver implementation. |
| 134 virtual void Observe(NotificationType type, | 134 virtual void Observe(int type, |
| 135 const NotificationSource& source, | 135 const NotificationSource& source, |
| 136 const NotificationDetails& details); | 136 const NotificationDetails& details); |
| 137 | 137 |
| 138 // Returns true if it is OK to open a folder which this file is inside. | 138 // Returns true if it is OK to open a folder which this file is inside. |
| 139 bool CanShowInFolder(); | 139 bool CanShowInFolder(); |
| 140 | 140 |
| 141 // Returns true if it is OK to register the type of this file so that | 141 // Returns true if it is OK to register the type of this file so that |
| 142 // it opens automatically. | 142 // it opens automatically. |
| 143 bool CanOpenDownload(); | 143 bool CanOpenDownload(); |
| 144 | 144 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 // only. | 471 // only. |
| 472 bool open_enabled_; | 472 bool open_enabled_; |
| 473 | 473 |
| 474 // DownloadItem observes CRX installs it initiates. | 474 // DownloadItem observes CRX installs it initiates. |
| 475 NotificationRegistrar registrar_; | 475 NotificationRegistrar registrar_; |
| 476 | 476 |
| 477 DISALLOW_COPY_AND_ASSIGN(DownloadItem); | 477 DISALLOW_COPY_AND_ASSIGN(DownloadItem); |
| 478 }; | 478 }; |
| 479 | 479 |
| 480 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 480 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
| OLD | NEW |