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 | |
121 // Overridden from DownloadItem. | 118 // Overridden from DownloadItem. |
122 virtual void AddObserver(DownloadItem::Observer* observer) OVERRIDE; | 119 virtual void AddObserver(DownloadItem::Observer* observer) OVERRIDE; |
123 virtual void RemoveObserver(DownloadItem::Observer* observer) OVERRIDE; | 120 virtual void RemoveObserver(DownloadItem::Observer* observer) OVERRIDE; |
124 virtual void UpdateObservers() OVERRIDE; | 121 virtual void UpdateObservers() OVERRIDE; |
125 virtual bool CanShowInFolder() OVERRIDE; | 122 virtual bool CanShowInFolder() OVERRIDE; |
126 virtual bool CanOpenDownload() OVERRIDE; | 123 virtual bool CanOpenDownload() OVERRIDE; |
127 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; | 124 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; |
128 virtual void OpenDownload() OVERRIDE; | 125 virtual void OpenDownload() OVERRIDE; |
129 virtual void ShowDownloadInShell() OVERRIDE; | 126 virtual void ShowDownloadInShell() OVERRIDE; |
130 virtual void DangerousDownloadValidated() OVERRIDE; | 127 virtual void DangerousDownloadValidated() OVERRIDE; |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 410 |
414 // Net log to use for this download. | 411 // Net log to use for this download. |
415 const net::BoundNetLog bound_net_log_; | 412 const net::BoundNetLog bound_net_log_; |
416 | 413 |
417 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 414 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
418 | 415 |
419 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 416 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
420 }; | 417 }; |
421 | 418 |
422 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 419 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |