| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 bool reserved_path_verified); | 200 bool reserved_path_verified); |
| 201 | 201 |
| 202 // Called on the UI thread once the final target path is available. | 202 // Called on the UI thread once the final target path is available. |
| 203 void OnTargetPathDetermined( | 203 void OnTargetPathDetermined( |
| 204 int32 download_id, | 204 int32 download_id, |
| 205 const content::DownloadTargetCallback& callback, | 205 const content::DownloadTargetCallback& callback, |
| 206 content::DownloadItem::TargetDisposition disposition, | 206 content::DownloadItem::TargetDisposition disposition, |
| 207 content::DownloadDangerType danger_type, | 207 content::DownloadDangerType danger_type, |
| 208 const FilePath& target_path); | 208 const FilePath& target_path); |
| 209 | 209 |
| 210 #if defined(ENABLE_WEB_INTENTS) |
| 210 // Check policy of whether we should open this download with a web intents | 211 // Check policy of whether we should open this download with a web intents |
| 211 // dispatch. | 212 // dispatch. |
| 212 bool ShouldOpenWithWebIntents(const content::DownloadItem* item); | 213 bool ShouldOpenWithWebIntents(const content::DownloadItem* item); |
| 213 | 214 |
| 214 // Open the given item with a web intent dispatch. | 215 // Open the given item with a web intent dispatch. |
| 215 void OpenWithWebIntent(const content::DownloadItem* item); | 216 void OpenWithWebIntent(const content::DownloadItem* item); |
| 217 #endif |
| 216 | 218 |
| 217 // Internal gateways for ShouldCompleteDownload(). | 219 // Internal gateways for ShouldCompleteDownload(). |
| 218 bool IsDownloadReadyForCompletion( | 220 bool IsDownloadReadyForCompletion( |
| 219 content::DownloadItem* item, | 221 content::DownloadItem* item, |
| 220 const base::Closure& internal_complete_callback); | 222 const base::Closure& internal_complete_callback); |
| 221 void ShouldCompleteDownloadInternal( | 223 void ShouldCompleteDownloadInternal( |
| 222 int download_id, | 224 int download_id, |
| 223 const base::Closure& user_complete_callback); | 225 const base::Closure& user_complete_callback); |
| 224 | 226 |
| 225 Profile* profile_; | 227 Profile* profile_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 250 #endif | 252 #endif |
| 251 | 253 |
| 252 // The directory most recently chosen by the user in response to a Save As | 254 // The directory most recently chosen by the user in response to a Save As |
| 253 // dialog for a regular download. | 255 // dialog for a regular download. |
| 254 FilePath last_download_path_; | 256 FilePath last_download_path_; |
| 255 | 257 |
| 256 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 258 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
| 257 }; | 259 }; |
| 258 | 260 |
| 259 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 261 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |