| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
| 14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 17 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "content/browser/download/download_destination_observer.h" | 20 #include "content/browser/download/download_destination_observer.h" |
| 20 #include "content/browser/download/download_net_log_parameters.h" | 21 #include "content/browser/download/download_net_log_parameters.h" |
| 21 #include "content/browser/download/download_request_handle.h" | 22 #include "content/browser/download/download_request_handle.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 base::Time GetStartTime() const override; | 154 base::Time GetStartTime() const override; |
| 154 base::Time GetEndTime() const override; | 155 base::Time GetEndTime() const override; |
| 155 bool CanShowInFolder() override; | 156 bool CanShowInFolder() override; |
| 156 bool CanOpenDownload() override; | 157 bool CanOpenDownload() override; |
| 157 bool ShouldOpenFileBasedOnExtension() override; | 158 bool ShouldOpenFileBasedOnExtension() override; |
| 158 bool GetOpenWhenComplete() const override; | 159 bool GetOpenWhenComplete() const override; |
| 159 bool GetAutoOpened() override; | 160 bool GetAutoOpened() override; |
| 160 bool GetOpened() const override; | 161 bool GetOpened() const override; |
| 161 BrowserContext* GetBrowserContext() const override; | 162 BrowserContext* GetBrowserContext() const override; |
| 162 WebContents* GetWebContents() const override; | 163 WebContents* GetWebContents() const override; |
| 163 void OnContentCheckCompleted(DownloadDangerType danger_type) override; | 164 void OnContentCheckCompleted(DownloadDangerType danger_type, |
| 165 bool block_file) override; |
| 164 void SetOpenWhenComplete(bool open) override; | 166 void SetOpenWhenComplete(bool open) override; |
| 165 void SetOpened(bool opened) override; | 167 void SetOpened(bool opened) override; |
| 166 void SetDisplayName(const base::FilePath& name) override; | 168 void SetDisplayName(const base::FilePath& name) override; |
| 167 std::string DebugString(bool verbose) const override; | 169 std::string DebugString(bool verbose) const override; |
| 168 | 170 |
| 169 // All remaining public interfaces virtual to allow for DownloadItemImpl | 171 // All remaining public interfaces virtual to allow for DownloadItemImpl |
| 170 // mocks. | 172 // mocks. |
| 171 | 173 |
| 172 // Determines the resume mode for an interrupted download. Requires | 174 // Determines the resume mode for an interrupted download. Requires |
| 173 // last_reason_ to be set, but doesn't require the download to be in | 175 // last_reason_ to be set, but doesn't require the download to be in |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 const net::NetLogWithSource net_log_; | 680 const net::NetLogWithSource net_log_; |
| 679 | 681 |
| 680 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 682 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 681 | 683 |
| 682 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 684 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 683 }; | 685 }; |
| 684 | 686 |
| 685 } // namespace content | 687 } // namespace content |
| 686 | 688 |
| 687 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 689 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |