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 #include "android_webview/browser/aw_download_manager_delegate.h" | 5 #include "android_webview/browser/aw_download_manager_delegate.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "content/public/browser/download_danger_type.h" | 8 #include "content/public/browser/download_danger_type.h" |
9 #include "content/public/browser/download_item.h" | 9 #include "content/public/browser/download_item.h" |
10 | 10 |
11 | 11 |
12 namespace android_webview { | 12 namespace android_webview { |
13 | 13 |
14 AwDownloadManagerDelegate::~AwDownloadManagerDelegate() {} | 14 AwDownloadManagerDelegate::~AwDownloadManagerDelegate() {} |
15 | 15 |
16 bool AwDownloadManagerDelegate::DetermineDownloadTarget( | 16 bool AwDownloadManagerDelegate::DetermineDownloadTarget( |
17 content::DownloadItem* item, | 17 content::DownloadItem* item, |
18 const content::DownloadTargetCallback& callback) { | 18 const content::DownloadTargetCallback& callback) { |
19 // Note this cancel is independent of the URLRequest cancel in | 19 // Note this cancel is independent of the URLRequest cancel in |
20 // AwResourceDispatcherHostDelegate::DownloadStarting. The request | 20 // AwResourceDispatcherHostDelegate::DownloadStarting. The request |
21 // could have already finished by the time DownloadStarting is called. | 21 // could have already finished by the time DownloadStarting is called. |
22 callback.Run(FilePath() /* Empty file path for cancel */, | 22 callback.Run(base::FilePath() /* Empty file path for cancel */, |
23 content::DownloadItem::TARGET_DISPOSITION_OVERWRITE, | 23 content::DownloadItem::TARGET_DISPOSITION_OVERWRITE, |
24 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, | 24 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |
25 FilePath()); | 25 base::FilePath()); |
26 return true; | 26 return true; |
27 } | 27 } |
28 | 28 |
29 bool AwDownloadManagerDelegate::ShouldCompleteDownload( | 29 bool AwDownloadManagerDelegate::ShouldCompleteDownload( |
30 content::DownloadItem* item, | 30 content::DownloadItem* item, |
31 const base::Closure& complete_callback) { | 31 const base::Closure& complete_callback) { |
32 NOTREACHED(); | 32 NOTREACHED(); |
33 return true; | 33 return true; |
34 } | 34 } |
35 | 35 |
36 bool AwDownloadManagerDelegate::ShouldOpenDownload( | 36 bool AwDownloadManagerDelegate::ShouldOpenDownload( |
37 content::DownloadItem* item, | 37 content::DownloadItem* item, |
38 const content::DownloadOpenDelayedCallback& callback) { | 38 const content::DownloadOpenDelayedCallback& callback) { |
39 NOTREACHED(); | 39 NOTREACHED(); |
40 return true; | 40 return true; |
41 } | 41 } |
42 | 42 |
43 } // namespace android_webview | 43 } // namespace android_webview |
OLD | NEW |