Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chromecast / browser / cast_download_manager_delegate.h
blobe6c963f131f9386d6ce8130aa315feb35235ba9e
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 ~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;
32 private:
33 DISALLOW_COPY_AND_ASSIGN(CastDownloadManagerDelegate);
36 } // namespace shell
37 } // namespace chromecast
39 #endif // CHROMECAST_BROWSER_CAST_DOWNLOAD_MANAGER_DELEGATE_H_