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 content::WebContents* | |
70 GetAlternativeWebContentsToNotifyForDownload() OVERRIDE; | |
71 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; | 69 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; |
72 virtual bool ShouldCompleteDownload( | 70 virtual bool ShouldCompleteDownload( |
73 content::DownloadItem* item, | 71 content::DownloadItem* item, |
74 const base::Closure& complete_callback) OVERRIDE; | 72 const base::Closure& complete_callback) OVERRIDE; |
75 virtual bool ShouldOpenDownload( | 73 virtual bool ShouldOpenDownload( |
76 content::DownloadItem* item, | 74 content::DownloadItem* item, |
77 const content::DownloadOpenDelayedCallback& callback) OVERRIDE; | 75 const content::DownloadOpenDelayedCallback& callback) OVERRIDE; |
78 virtual bool GenerateFileHash() OVERRIDE; | 76 virtual bool GenerateFileHash() OVERRIDE; |
79 virtual void GetSaveDir(content::BrowserContext* browser_context, | 77 virtual void GetSaveDir(content::BrowserContext* browser_context, |
80 FilePath* website_save_dir, | 78 FilePath* website_save_dir, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 #endif | 243 #endif |
246 | 244 |
247 // The directory most recently chosen by the user in response to a Save As | 245 // The directory most recently chosen by the user in response to a Save As |
248 // dialog for a regular download. | 246 // dialog for a regular download. |
249 FilePath last_download_path_; | 247 FilePath last_download_path_; |
250 | 248 |
251 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 249 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
252 }; | 250 }; |
253 | 251 |
254 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 252 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
OLD | NEW |