| 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 ANDROID_WEBVIEW_BROWSER_AW_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/download_manager_delegate.h" | 8 #include "content/public/browser/download_manager_delegate.h" |
| 9 | 9 |
| 10 namespace android_webview { | 10 namespace android_webview { |
| 11 | 11 |
| 12 // Android WebView does not use Chromium downloads, so implement methods here to | 12 // Android WebView does not use Chromium downloads, so implement methods here to |
| 13 // unconditionally cancel the download. | 13 // unconditionally cancel the download. |
| 14 class AwDownloadManagerDelegate : public content::DownloadManagerDelegate { | 14 class AwDownloadManagerDelegate : public content::DownloadManagerDelegate { |
| 15 public: | 15 public: |
| 16 virtual ~AwDownloadManagerDelegate(); | 16 virtual ~AwDownloadManagerDelegate(); |
| 17 | 17 |
| 18 // content::DownloadManagerDelegate implementation. | 18 // content::DownloadManagerDelegate implementation. |
| 19 virtual bool DetermineDownloadTarget( | 19 virtual bool DetermineDownloadTarget( |
| 20 content::DownloadItem* item, | 20 content::DownloadItem* item, |
| 21 const content::DownloadTargetCallback& callback) OVERRIDE; | 21 const content::DownloadTargetCallback& callback) override; |
| 22 virtual bool ShouldCompleteDownload( | 22 virtual bool ShouldCompleteDownload( |
| 23 content::DownloadItem* item, | 23 content::DownloadItem* item, |
| 24 const base::Closure& complete_callback) OVERRIDE; | 24 const base::Closure& complete_callback) override; |
| 25 virtual bool ShouldOpenDownload( | 25 virtual bool ShouldOpenDownload( |
| 26 content::DownloadItem* item, | 26 content::DownloadItem* item, |
| 27 const content::DownloadOpenDelayedCallback& callback) OVERRIDE; | 27 const content::DownloadOpenDelayedCallback& callback) override; |
| 28 virtual void GetNextId(const content::DownloadIdCallback& callback) OVERRIDE; | 28 virtual void GetNextId(const content::DownloadIdCallback& callback) override; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 } // namespace android_webview | 31 } // namespace android_webview |
| 32 | 32 |
| 33 #endif // ANDROID_WEBVIEW_BROWSER_AW_DOWNLOAD_MANAGER_DELEGATE_H_ | 33 #endif // ANDROID_WEBVIEW_BROWSER_AW_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |