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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // Called with the results of DetermineDownloadTarget(). If the delegate decides | 36 // Called with the results of DetermineDownloadTarget(). If the delegate decides |
37 // to cancel the download, then |target_path| should be set to an empty path. If | 37 // to cancel the download, then |target_path| should be set to an empty path. If |
38 // |target_path| is non-empty, then |intermediate_path| is required to be | 38 // |target_path| is non-empty, then |intermediate_path| is required to be |
39 // non-empty and specify the path to the intermediate file (which could be the | 39 // non-empty and specify the path to the intermediate file (which could be the |
40 // same as |target_path|). Both |target_path| and |intermediate_path| are | 40 // same as |target_path|). Both |target_path| and |intermediate_path| are |
41 // expected to in the same directory. | 41 // expected to in the same directory. |
42 typedef base::Callback<void( | 42 typedef base::Callback<void( |
43 const base::FilePath& target_path, | 43 const base::FilePath& target_path, |
44 DownloadItem::TargetDisposition disposition, | 44 DownloadItem::TargetDisposition disposition, |
45 DownloadDangerType danger_type, | 45 DownloadDangerType danger_type, |
46 const base::FilePath& intermediate_path)> DownloadTargetCallback; | 46 const base::FilePath& intermediate_path, |
| 47 bool hide_file_extension)> DownloadTargetCallback; |
47 | 48 |
48 // Called when a download delayed by the delegate has completed. | 49 // Called when a download delayed by the delegate has completed. |
49 typedef base::Callback<void(bool)> DownloadOpenDelayedCallback; | 50 typedef base::Callback<void(bool)> DownloadOpenDelayedCallback; |
50 | 51 |
51 // Called with the result of CheckForFileExistence(). | 52 // Called with the result of CheckForFileExistence(). |
52 typedef base::Callback<void(bool result)> CheckForFileExistenceCallback; | 53 typedef base::Callback<void(bool result)> CheckForFileExistenceCallback; |
53 | 54 |
54 typedef base::Callback<void(uint32)> DownloadIdCallback; | 55 typedef base::Callback<void(uint32)> DownloadIdCallback; |
55 | 56 |
56 // Browser's download manager: manages all downloads and destination view. | 57 // Browser's download manager: manages all downloads and destination view. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // will be given to the AV function. | 136 // will be given to the AV function. |
136 virtual std::string ApplicationClientIdForFileScanning() const; | 137 virtual std::string ApplicationClientIdForFileScanning() const; |
137 | 138 |
138 protected: | 139 protected: |
139 virtual ~DownloadManagerDelegate(); | 140 virtual ~DownloadManagerDelegate(); |
140 }; | 141 }; |
141 | 142 |
142 } // namespace content | 143 } // namespace content |
143 | 144 |
144 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 145 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
OLD | NEW |