1 // Copyright 2014 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 CHROMECAST_BROWSER_CAST_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CHROMECAST_BROWSER_CAST_DOWNLOAD_MANAGER_DELEGATE_H_
8 #include "base/macros.h"
9 #include "content/public/browser/download_manager_delegate.h"
11 namespace chromecast
{
14 class CastDownloadManagerDelegate
: public content::DownloadManagerDelegate
{
16 CastDownloadManagerDelegate();
17 virtual ~CastDownloadManagerDelegate();
19 // content::DownloadManagerDelegate implementation:
20 virtual void GetNextId(
21 const content::DownloadIdCallback
& callback
) override
;
22 virtual bool DetermineDownloadTarget(
23 content::DownloadItem
* item
,
24 const content::DownloadTargetCallback
& callback
) override
;
25 virtual bool ShouldOpenFileBasedOnExtension(
26 const base::FilePath
& path
) override
;
27 virtual bool ShouldCompleteDownload(
28 content::DownloadItem
* item
,
29 const base::Closure
& complete_callback
) override
;
30 virtual bool ShouldOpenDownload(
31 content::DownloadItem
* item
,
32 const content::DownloadOpenDelayedCallback
& callback
) override
;
35 DISALLOW_COPY_AND_ASSIGN(CastDownloadManagerDelegate
);
39 } // namespace chromecast
41 #endif // CHROMECAST_BROWSER_CAST_DOWNLOAD_MANAGER_DELEGATE_H_