Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/public/browser/save_page_type.h" | 14 #include "content/public/browser/save_page_type.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class DownloadId; | 18 class DownloadId; |
| 19 class DownloadItem; | 19 class DownloadItem; |
| 20 class WebContents; | 20 class WebContents; |
| 21 | 21 |
| 22 typedef base::Callback<void(const FilePath&, content::SavePageType)> | 22 typedef base::Callback<void(DownloadItem*)> |
|
achuithb
2012/04/24 22:26:05
comments explaining what these callbacks are for,
benjhayden
2012/04/26 15:05:57
Done.
| |
| 23 SaveFileDownloadCreatedCallback; | |
| 24 typedef base::Callback<void(const FilePath&, | |
| 25 content::SavePageType, | |
| 26 SaveFileDownloadCreatedCallback)> | |
| 23 SaveFilePathPickedCallback; | 27 SaveFilePathPickedCallback; |
| 24 | 28 |
| 25 // Browser's download manager: manages all downloads and destination view. | 29 // Browser's download manager: manages all downloads and destination view. |
| 26 class CONTENT_EXPORT DownloadManagerDelegate { | 30 class CONTENT_EXPORT DownloadManagerDelegate { |
| 27 public: | 31 public: |
| 28 virtual ~DownloadManagerDelegate() {} | 32 virtual ~DownloadManagerDelegate() {} |
| 29 | 33 |
| 30 // Lets the delegate know that the download manager is shutting down. | 34 // Lets the delegate know that the download manager is shutting down. |
| 31 virtual void Shutdown() {} | 35 virtual void Shutdown() {} |
| 32 | 36 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 virtual void ChooseSavePath(WebContents* web_contents, | 119 virtual void ChooseSavePath(WebContents* web_contents, |
| 116 const FilePath& suggested_path, | 120 const FilePath& suggested_path, |
| 117 const FilePath::StringType& default_extension, | 121 const FilePath::StringType& default_extension, |
| 118 bool can_save_as_complete, | 122 bool can_save_as_complete, |
| 119 SaveFilePathPickedCallback callback) {} | 123 SaveFilePathPickedCallback callback) {} |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 } // namespace content | 126 } // namespace content |
| 123 | 127 |
| 124 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 128 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |