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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Called by SavePackage to display progress when the DownloadItem | 97 // Called by SavePackage to display progress when the DownloadItem |
98 // should be considered complete. | 98 // should be considered complete. |
99 virtual void MarkAsComplete(); | 99 virtual void MarkAsComplete(); |
100 | 100 |
101 // Called when all data has been saved. Only has display effects. | 101 // Called when all data has been saved. Only has display effects. |
102 virtual void OnAllDataSaved(int64 size, const std::string& final_hash); | 102 virtual void OnAllDataSaved(int64 size, const std::string& final_hash); |
103 | 103 |
104 // Called by SavePackage to set the total number of bytes on the item. | 104 // Called by SavePackage to set the total number of bytes on the item. |
105 virtual void SetTotalBytes(int64 total_bytes); | 105 virtual void SetTotalBytes(int64 total_bytes); |
106 | 106 |
| 107 // Notify observers that this item is being removed by the user. |
| 108 virtual void NotifyRemoved(); |
| 109 |
107 // Overridden from DownloadItem. | 110 // Overridden from DownloadItem. |
108 virtual void AddObserver(DownloadItem::Observer* observer) OVERRIDE; | 111 virtual void AddObserver(DownloadItem::Observer* observer) OVERRIDE; |
109 virtual void RemoveObserver(DownloadItem::Observer* observer) OVERRIDE; | 112 virtual void RemoveObserver(DownloadItem::Observer* observer) OVERRIDE; |
110 virtual void UpdateObservers() OVERRIDE; | 113 virtual void UpdateObservers() OVERRIDE; |
111 virtual bool CanShowInFolder() OVERRIDE; | 114 virtual bool CanShowInFolder() OVERRIDE; |
112 virtual bool CanOpenDownload() OVERRIDE; | 115 virtual bool CanOpenDownload() OVERRIDE; |
113 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; | 116 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; |
114 virtual void OpenDownload() OVERRIDE; | 117 virtual void OpenDownload() OVERRIDE; |
115 virtual void ShowDownloadInShell() OVERRIDE; | 118 virtual void ShowDownloadInShell() OVERRIDE; |
116 virtual void DangerousDownloadValidated() OVERRIDE; | 119 virtual void DangerousDownloadValidated() OVERRIDE; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 410 |
408 // Net log to use for this download. | 411 // Net log to use for this download. |
409 const net::BoundNetLog bound_net_log_; | 412 const net::BoundNetLog bound_net_log_; |
410 | 413 |
411 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 414 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
412 | 415 |
413 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 416 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
414 }; | 417 }; |
415 | 418 |
416 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 419 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |