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