| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/browser/download/download_manager_delegate.h" | 11 #include "content/browser/download/download_manager_delegate.h" |
| 12 | 12 |
| 13 class DownloadManager; | 13 class DownloadManager; |
| 14 struct DownloadStateInfo; | 14 struct DownloadStateInfo; |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class ShellDownloadManagerDelegate | 18 class ShellDownloadManagerDelegate |
| 19 : public DownloadManagerDelegate, | 19 : public DownloadManagerDelegate, |
| 20 public base::RefCountedThreadSafe<ShellDownloadManagerDelegate> { | 20 public base::RefCountedThreadSafe<ShellDownloadManagerDelegate> { |
| 21 public: | 21 public: |
| 22 ShellDownloadManagerDelegate(); | 22 ShellDownloadManagerDelegate(); |
| 23 | 23 |
| 24 void SetDownloadManager(DownloadManager* download_manager); | 24 void SetDownloadManager(DownloadManager* manager); |
| 25 | 25 |
| 26 virtual void Shutdown() OVERRIDE; | 26 virtual void Shutdown() OVERRIDE; |
| 27 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE; | 27 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE; |
| 28 virtual void ChooseDownloadPath(TabContents* tab_contents, | 28 virtual void ChooseDownloadPath(TabContents* tab_contents, |
| 29 const FilePath& suggested_path, | 29 const FilePath& suggested_path, |
| 30 void* data) OVERRIDE; | 30 void* data) OVERRIDE; |
| 31 virtual bool OverrideIntermediatePath(DownloadItem* item, | 31 virtual bool OverrideIntermediatePath(DownloadItem* item, |
| 32 FilePath* intermediate_path) OVERRIDE; | 32 FilePath* intermediate_path) OVERRIDE; |
| 33 virtual TabContents* GetAlternativeTabContentsToNotifyForDownload() OVERRIDE; | 33 virtual TabContents* GetAlternativeTabContentsToNotifyForDownload() OVERRIDE; |
| 34 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; | 34 virtual bool ShouldOpenFileBasedOnExtension(const FilePath& path) OVERRIDE; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 DownloadStateInfo state); | 66 DownloadStateInfo state); |
| 67 | 67 |
| 68 DownloadManager* download_manager_; | 68 DownloadManager* download_manager_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate); | 70 DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace content | 73 } // namespace content |
| 74 | 74 |
| 75 #endif // CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ | 75 #endif // CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |