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 "content/public/browser/download_manager_delegate.h" | 5 #include "content/public/browser/download_manager_delegate.h" |
6 | 6 |
7 #include "content/public/browser/download_id.h" | 7 #include "content/public/browser/download_id.h" |
8 #include "content/public/browser/download_item.h" | 8 #include "content/public/browser/download_item.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 DownloadId DownloadManagerDelegate::GetNextId() { | 12 DownloadId DownloadManagerDelegate::GetNextId() { |
13 return DownloadId::Invalid(); | 13 return DownloadId::Invalid(); |
14 } | 14 } |
15 | 15 |
16 bool DownloadManagerDelegate::ShouldStartDownload(int32 download_id) { | 16 bool DownloadManagerDelegate::DetermineDownloadTarget(DownloadItem* item) { |
17 return true; | 17 return false; |
18 } | |
19 | |
20 FilePath DownloadManagerDelegate::GetIntermediatePath( | |
21 const DownloadItem& item) { | |
22 return item.GetTargetFilePath(); | |
23 } | 18 } |
24 | 19 |
25 WebContents* DownloadManagerDelegate:: | 20 WebContents* DownloadManagerDelegate:: |
26 GetAlternativeWebContentsToNotifyForDownload() { | 21 GetAlternativeWebContentsToNotifyForDownload() { |
27 return NULL; | 22 return NULL; |
28 } | 23 } |
29 | 24 |
30 bool DownloadManagerDelegate::ShouldOpenFileBasedOnExtension( | 25 bool DownloadManagerDelegate::ShouldOpenFileBasedOnExtension( |
31 const FilePath& path) { | 26 const FilePath& path) { |
32 return false; | 27 return false; |
33 } | 28 } |
34 | 29 |
35 bool DownloadManagerDelegate::ShouldCompleteDownload( | 30 bool DownloadManagerDelegate::ShouldCompleteDownload( |
36 DownloadItem* item, | 31 DownloadItem* item, |
37 const base::Closure& complete_callback) { | 32 const base::Closure& complete_callback) { |
38 return true; | 33 return true; |
39 } | 34 } |
40 | 35 |
41 bool DownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { | 36 bool DownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { |
42 return true; | 37 return true; |
43 } | 38 } |
44 | 39 |
45 bool DownloadManagerDelegate::GenerateFileHash() { | 40 bool DownloadManagerDelegate::GenerateFileHash() { |
46 return false; | 41 return false; |
47 } | 42 } |
48 | 43 |
49 DownloadManagerDelegate::~DownloadManagerDelegate() {} | 44 DownloadManagerDelegate::~DownloadManagerDelegate() {} |
50 | 45 |
51 } // namespace content | 46 } // namespace content |
OLD | NEW |