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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 virtual bool CanShowInFolder() OVERRIDE; | 118 virtual bool CanShowInFolder() OVERRIDE; |
119 virtual bool CanOpenDownload() OVERRIDE; | 119 virtual bool CanOpenDownload() OVERRIDE; |
120 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; | 120 virtual bool ShouldOpenFileBasedOnExtension() OVERRIDE; |
121 virtual bool GetOpenWhenComplete() const OVERRIDE; | 121 virtual bool GetOpenWhenComplete() const OVERRIDE; |
122 virtual bool GetAutoOpened() OVERRIDE; | 122 virtual bool GetAutoOpened() OVERRIDE; |
123 virtual bool GetOpened() const OVERRIDE; | 123 virtual bool GetOpened() const OVERRIDE; |
124 virtual content::DownloadPersistentStoreInfo | 124 virtual content::DownloadPersistentStoreInfo |
125 GetPersistentStoreInfo() const OVERRIDE; | 125 GetPersistentStoreInfo() const OVERRIDE; |
126 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 126 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
127 virtual content::WebContents* GetWebContents() const OVERRIDE; | 127 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 128 virtual void SetShouldShowInDownloadsUI(bool should_show) OVERRIDE; |
| 129 virtual bool ShouldShowInDownloadsUI() const OVERRIDE; |
128 virtual void DelayedDownloadOpened(bool auto_opened) OVERRIDE; | 130 virtual void DelayedDownloadOpened(bool auto_opened) OVERRIDE; |
129 virtual void OnContentCheckCompleted( | 131 virtual void OnContentCheckCompleted( |
130 content::DownloadDangerType danger_type) OVERRIDE; | 132 content::DownloadDangerType danger_type) OVERRIDE; |
131 virtual void SetOpenWhenComplete(bool open) OVERRIDE; | 133 virtual void SetOpenWhenComplete(bool open) OVERRIDE; |
132 virtual void SetIsTemporary(bool temporary) OVERRIDE; | 134 virtual void SetIsTemporary(bool temporary) OVERRIDE; |
133 virtual void SetOpened(bool opened) OVERRIDE; | 135 virtual void SetOpened(bool opened) OVERRIDE; |
134 virtual void SetDisplayName(const FilePath& name) OVERRIDE; | 136 virtual void SetDisplayName(const FilePath& name) OVERRIDE; |
135 virtual std::string DebugString(bool verbose) const OVERRIDE; | 137 virtual std::string DebugString(bool verbose) const OVERRIDE; |
136 virtual void MockDownloadOpenForTesting() OVERRIDE; | 138 virtual void MockDownloadOpenForTesting() OVERRIDE; |
137 | 139 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 446 |
445 // Do we actually open downloads when requested? For testing purposes only. | 447 // Do we actually open downloads when requested? For testing purposes only. |
446 bool open_enabled_; | 448 bool open_enabled_; |
447 | 449 |
448 // Did the delegate delay calling Complete on this download? | 450 // Did the delegate delay calling Complete on this download? |
449 bool delegate_delayed_complete_; | 451 bool delegate_delayed_complete_; |
450 | 452 |
451 // Net log to use for this download. | 453 // Net log to use for this download. |
452 const net::BoundNetLog bound_net_log_; | 454 const net::BoundNetLog bound_net_log_; |
453 | 455 |
| 456 // Controls whether the download should be shown in the download UI. |
| 457 bool should_show_in_downloads_ui_; |
| 458 |
454 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 459 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
455 | 460 |
456 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 461 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
457 }; | 462 }; |
458 | 463 |
459 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 464 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |