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 CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Should be called before the first call to ShouldCompleteDownload() to | 59 // Should be called before the first call to ShouldCompleteDownload() to |
60 // disable SafeBrowsing checks for |item|. | 60 // disable SafeBrowsing checks for |item|. |
61 static void DisableSafeBrowsing(content::DownloadItem* item); | 61 static void DisableSafeBrowsing(content::DownloadItem* item); |
62 | 62 |
63 // content::DownloadManagerDelegate | 63 // content::DownloadManagerDelegate |
64 virtual void Shutdown() OVERRIDE; | 64 virtual void Shutdown() OVERRIDE; |
65 virtual content::DownloadId GetNextId() OVERRIDE; | 65 virtual content::DownloadId GetNextId() OVERRIDE; |
66 virtual bool DetermineDownloadTarget( | 66 virtual bool DetermineDownloadTarget( |
67 content::DownloadItem* item, | 67 content::DownloadItem* item, |
68 const content::DownloadTargetCallback& callback) OVERRIDE; | 68 const content::DownloadTargetCallback& callback) OVERRIDE; |
| 69 virtual int64 GetIntermediateFileLength(const FilePath& path, |
| 70 bool temporary) OVERRIDE; |
69 virtual content::WebContents* | 71 virtual content::WebContents* |
70 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE; | 72 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE; |
71 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; | 73 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; |
72 virtual bool ShouldCompleteDownload( | 74 virtual bool ShouldCompleteDownload( |
73 content::DownloadItem* item, | 75 content::DownloadItem* item, |
74 const base::Closure& complete_callback) OVERRIDE; | 76 const base::Closure& complete_callback) OVERRIDE; |
75 virtual bool ShouldOpenDownload( | 77 virtual bool ShouldOpenDownload( |
76 content::DownloadItem* item, | 78 content::DownloadItem* item, |
77 const content::DownloadOpenDelayedCallback& callback) OVERRIDE; | 79 const content::DownloadOpenDelayedCallback& callback) OVERRIDE; |
78 virtual bool GenerateFileHash() OVERRIDE; | 80 virtual bool GenerateFileHash() OVERRIDE; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 #endif | 247 #endif |
246 | 248 |
247 // The directory most recently chosen by the user in response to a Save As | 249 // The directory most recently chosen by the user in response to a Save As |
248 // dialog for a regular download. | 250 // dialog for a regular download. |
249 FilePath last_download_path_; | 251 FilePath last_download_path_; |
250 | 252 |
251 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 253 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
252 }; | 254 }; |
253 | 255 |
254 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 256 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
OLD | NEW |