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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Called by SavePackage to display progress when the DownloadItem | 108 // Called by SavePackage to display progress when the DownloadItem |
109 // should be considered complete. | 109 // should be considered complete. |
110 virtual void MarkAsComplete(); | 110 virtual void MarkAsComplete(); |
111 | 111 |
112 // Called when all data has been saved. Only has display effects. | 112 // Called when all data has been saved. Only has display effects. |
113 virtual void OnAllDataSaved(int64 size, const std::string& final_hash); | 113 virtual void OnAllDataSaved(int64 size, const std::string& final_hash); |
114 | 114 |
115 // Called by SavePackage to set the total number of bytes on the item. | 115 // Called by SavePackage to set the total number of bytes on the item. |
116 virtual void SetTotalBytes(int64 total_bytes); | 116 virtual void SetTotalBytes(int64 total_bytes); |
117 | 117 |
| 118 // Notify observers that this item is being removed by the user. |
| 119 virtual void NotifyRemoved(); |
| 120 |
118 // Overridden from DownloadItem. | 121 // Overridden from DownloadItem. |
119 virtual void AddObserver(DownloadItem::Observer* observer) OVERRIDE; | 122 virtual void AddObserver(DownloadItem::Observer* observer) OVERRIDE; |
120 virtual void RemoveObserver(DownloadItem::Observer* observer) OVERRIDE; | 123 virtual void RemoveObserver(DownloadItem::Observer* observer) OVERRIDE; |
121 virtual void UpdateObservers() OVERRIDE; | 124 virtual void UpdateObservers() OVERRIDE; |
122 virtual bool CanShowInFolder() OVERRIDE; | 125 virtual bool CanShowInFolder() OVERRIDE; |
123 virtual bool CanOpenDownload() OVERRIDE; | 126 virtual bool CanOpenDownload() OVERRIDE; |
124 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; | 127 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; |
125 virtual void OpenDownload() OVERRIDE; | 128 virtual void OpenDownload() OVERRIDE; |
126 virtual void ShowDownloadInShell() OVERRIDE; | 129 virtual void ShowDownloadInShell() OVERRIDE; |
127 virtual void DangerousDownloadValidated() OVERRIDE; | 130 virtual void DangerousDownloadValidated() OVERRIDE; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 | 406 |
404 // Net log to use for this download. | 407 // Net log to use for this download. |
405 const net::BoundNetLog bound_net_log_; | 408 const net::BoundNetLog bound_net_log_; |
406 | 409 |
407 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 410 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
408 | 411 |
409 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 412 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
410 }; | 413 }; |
411 | 414 |
412 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 415 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |