Reorganizes Chromecast code to better reflect functional dependencies.
[chromium-blink-merge.git] / chromecast / browser / cast_download_manager_delegate.h
blobd77e07f1da9d558cdff0eb0cd20826613405e0e8
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 {
12 namespace shell {
14 class CastDownloadManagerDelegate : public content::DownloadManagerDelegate {
15 public:
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;
34 private:
35 DISALLOW_COPY_AND_ASSIGN(CastDownloadManagerDelegate);
38 } // namespace shell
39 } // namespace chromecast
41 #endif // CHROMECAST_BROWSER_CAST_DOWNLOAD_MANAGER_DELEGATE_H_