| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public base::RefCountedThreadSafe<ShellDownloadManagerDelegate> { | 21 public base::RefCountedThreadSafe<ShellDownloadManagerDelegate> { |
| 22 public: | 22 public: |
| 23 ShellDownloadManagerDelegate(); | 23 ShellDownloadManagerDelegate(); |
| 24 | 24 |
| 25 void SetDownloadManager(DownloadManager* manager); | 25 void SetDownloadManager(DownloadManager* manager); |
| 26 | 26 |
| 27 virtual DownloadId GetNextId() OVERRIDE; | 27 virtual DownloadId GetNextId() OVERRIDE; |
| 28 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE; | 28 virtual bool ShouldStartDownload(int32 download_id) OVERRIDE; |
| 29 virtual void ChooseDownloadPath(WebContents* web_contents, | 29 virtual void ChooseDownloadPath(WebContents* web_contents, |
| 30 const FilePath& suggested_path, | 30 const FilePath& suggested_path, |
| 31 void* data) OVERRIDE; | 31 int32 download_id) OVERRIDE; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 friend class base::RefCountedThreadSafe<ShellDownloadManagerDelegate>; | 34 friend class base::RefCountedThreadSafe<ShellDownloadManagerDelegate>; |
| 35 | 35 |
| 36 virtual ~ShellDownloadManagerDelegate(); | 36 virtual ~ShellDownloadManagerDelegate(); |
| 37 | 37 |
| 38 void GenerateFilename(int32 download_id, | 38 void GenerateFilename(int32 download_id, |
| 39 DownloadStateInfo state, | 39 DownloadStateInfo state, |
| 40 const FilePath& generated_name); | 40 const FilePath& generated_name); |
| 41 void RestartDownload(int32 download_id, | 41 void RestartDownload(int32 download_id, |
| 42 DownloadStateInfo state); | 42 DownloadStateInfo state); |
| 43 | 43 |
| 44 DownloadManager* download_manager_; | 44 DownloadManager* download_manager_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate); | 46 DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace content | 49 } // namespace content |
| 50 | 50 |
| 51 #endif // CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ | 51 #endif // CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |