| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 bool CanShowInFolder() override; | 165 bool CanShowInFolder() override; |
| 165 bool CanOpenDownload() override; | 166 bool CanOpenDownload() override; |
| 166 bool ShouldOpenFileBasedOnExtension() override; | 167 bool ShouldOpenFileBasedOnExtension() override; |
| 167 bool GetOpenWhenComplete() const override; | 168 bool GetOpenWhenComplete() const override; |
| 168 bool GetAutoOpened() override; | 169 bool GetAutoOpened() override; |
| 169 bool GetOpened() const override; | 170 bool GetOpened() const override; |
| 170 base::Time GetLastAccessTime() const override; | 171 base::Time GetLastAccessTime() const override; |
| 171 bool IsTransient() const override; | 172 bool IsTransient() const override; |
| 172 BrowserContext* GetBrowserContext() const override; | 173 BrowserContext* GetBrowserContext() const override; |
| 173 WebContents* GetWebContents() const override; | 174 WebContents* GetWebContents() const override; |
| 174 void OnContentCheckCompleted(DownloadDangerType danger_type) override; | 175 void OnContentCheckCompleted(DownloadDangerType danger_type, |
| 176 DownloadInterruptReason reason) override; |
| 175 void SetOpenWhenComplete(bool open) override; | 177 void SetOpenWhenComplete(bool open) override; |
| 176 void SetOpened(bool opened) override; | 178 void SetOpened(bool opened) override; |
| 177 void SetLastAccessTime(base::Time last_access_time) override; | 179 void SetLastAccessTime(base::Time last_access_time) override; |
| 178 void SetDisplayName(const base::FilePath& name) override; | 180 void SetDisplayName(const base::FilePath& name) override; |
| 179 std::string DebugString(bool verbose) const override; | 181 std::string DebugString(bool verbose) const override; |
| 180 | 182 |
| 181 // All remaining public interfaces virtual to allow for DownloadItemImpl | 183 // All remaining public interfaces virtual to allow for DownloadItemImpl |
| 182 // mocks. | 184 // mocks. |
| 183 | 185 |
| 184 // Determines the resume mode for an interrupted download. Requires | 186 // Determines the resume mode for an interrupted download. Requires |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 int64_t received_bytes_at_length_mismatch = -1; | 714 int64_t received_bytes_at_length_mismatch = -1; |
| 713 | 715 |
| 714 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 716 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 715 | 717 |
| 716 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 718 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 717 }; | 719 }; |
| 718 | 720 |
| 719 } // namespace content | 721 } // namespace content |
| 720 | 722 |
| 721 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 723 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |