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 ~CastDownloadManagerDelegate() override
;
19 // content::DownloadManagerDelegate implementation:
20 void GetNextId(const content::DownloadIdCallback
& callback
) override
;
21 bool DetermineDownloadTarget(
22 content::DownloadItem
* item
,
23 const content::DownloadTargetCallback
& callback
) override
;
24 bool ShouldOpenFileBasedOnExtension(const base::FilePath
& path
) override
;
25 bool ShouldCompleteDownload(
26 content::DownloadItem
* item
,
27 const base::Closure
& complete_callback
) override
;
28 bool ShouldOpenDownload(
29 content::DownloadItem
* item
,
30 const content::DownloadOpenDelayedCallback
& callback
) override
;
33 DISALLOW_COPY_AND_ASSIGN(CastDownloadManagerDelegate
);
37 } // namespace chromecast
39 #endif // CHROMECAST_BROWSER_CAST_DOWNLOAD_MANAGER_DELEGATE_H_