| 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( |
| 17 return true; | 17 DownloadItem* item, |
| 18 } | 18 const content::DownloadTargetCallback& callback) { |
| 19 | 19 return false; |
| 20 FilePath DownloadManagerDelegate::GetIntermediatePath( | |
| 21 const DownloadItem& item) { | |
| 22 return item.GetTargetFilePath(); | |
| 23 } | 20 } |
| 24 | 21 |
| 25 WebContents* DownloadManagerDelegate:: | 22 WebContents* DownloadManagerDelegate:: |
| 26 GetAlternativeWebContentsToNotifyForDownload() { | 23 GetAlternativeWebContentsToNotifyForDownload() { |
| 27 return NULL; | 24 return NULL; |
| 28 } | 25 } |
| 29 | 26 |
| 30 bool DownloadManagerDelegate::ShouldOpenFileBasedOnExtension( | 27 bool DownloadManagerDelegate::ShouldOpenFileBasedOnExtension( |
| 31 const FilePath& path) { | 28 const FilePath& path) { |
| 32 return false; | 29 return false; |
| 33 } | 30 } |
| 34 | 31 |
| 35 bool DownloadManagerDelegate::ShouldCompleteDownload( | 32 bool DownloadManagerDelegate::ShouldCompleteDownload( |
| 36 DownloadItem* item, | 33 DownloadItem* item, |
| 37 const base::Closure& complete_callback) { | 34 const base::Closure& complete_callback) { |
| 38 return true; | 35 return true; |
| 39 } | 36 } |
| 40 | 37 |
| 41 bool DownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { | 38 bool DownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { |
| 42 return true; | 39 return true; |
| 43 } | 40 } |
| 44 | 41 |
| 45 bool DownloadManagerDelegate::GenerateFileHash() { | 42 bool DownloadManagerDelegate::GenerateFileHash() { |
| 46 return false; | 43 return false; |
| 47 } | 44 } |
| 48 | 45 |
| 49 DownloadManagerDelegate::~DownloadManagerDelegate() {} | 46 DownloadManagerDelegate::~DownloadManagerDelegate() {} |
| 50 | 47 |
| 51 } // namespace content | 48 } // namespace content |
| OLD | NEW |