| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 | 9 |
| 10 #include "chrome/browser/download/download_path_reservation_tracker.h" | 10 #include "chrome/browser/download/download_path_reservation_tracker.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // |reserved_path| should contain the reserved path. Otherwise, |successful| | 40 // |reserved_path| should contain the reserved path. Otherwise, |successful| |
| 41 // should be false. In the failure case, |reserved_path| is ignored. | 41 // should be false. In the failure case, |reserved_path| is ignored. |
| 42 typedef base::Callback<void(const base::FilePath& reserved_path, | 42 typedef base::Callback<void(const base::FilePath& reserved_path, |
| 43 bool successful)> ReservedPathCallback; | 43 bool successful)> ReservedPathCallback; |
| 44 | 44 |
| 45 // Callback to be invoked when PromptUserForDownloadPath() completes. | 45 // Callback to be invoked when PromptUserForDownloadPath() completes. |
| 46 // |virtual_path|: The path chosen by the user. If the user cancels the file | 46 // |virtual_path|: The path chosen by the user. If the user cancels the file |
| 47 // selection, then this parameter will be the empty path. On Chrome OS, | 47 // selection, then this parameter will be the empty path. On Chrome OS, |
| 48 // this path may contain virtual mount points if the user chose a virtual | 48 // this path may contain virtual mount points if the user chose a virtual |
| 49 // path (e.g. Google Drive). | 49 // path (e.g. Google Drive). |
| 50 typedef base::Callback<void(const base::FilePath& virtual_path)> | 50 typedef base::Callback<void(const base::FilePath& virtual_path, |
| 51 FileSelectedCallback; | 51 bool hide_file_extension)> FileSelectedCallback; |
| 52 | 52 |
| 53 // Callback to be invoked when DetermineLocalPath() completes. The argument | 53 // Callback to be invoked when DetermineLocalPath() completes. The argument |
| 54 // should be the determined local path. It should be non-empty on success. If | 54 // should be the determined local path. It should be non-empty on success. If |
| 55 // |virtual_path| is already a local path, then |virtual_path| should be | 55 // |virtual_path| is already a local path, then |virtual_path| should be |
| 56 // returned as-is. | 56 // returned as-is. |
| 57 typedef base::Callback<void(const base::FilePath&)> LocalPathCallback; | 57 typedef base::Callback<void(const base::FilePath&)> LocalPathCallback; |
| 58 | 58 |
| 59 // Callback to be invoked after CheckDownloadUrl() completes. The parameter to | 59 // Callback to be invoked after CheckDownloadUrl() completes. The parameter to |
| 60 // the callback should indicate the danger type of the download based on the | 60 // the callback should indicate the danger type of the download based on the |
| 61 // results of the URL check. | 61 // results of the URL check. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const CheckDownloadUrlCallback& callback) = 0; | 116 const CheckDownloadUrlCallback& callback) = 0; |
| 117 | 117 |
| 118 // Get the MIME type for the given file. | 118 // Get the MIME type for the given file. |
| 119 virtual void GetFileMimeType(const base::FilePath& path, | 119 virtual void GetFileMimeType(const base::FilePath& path, |
| 120 const GetFileMimeTypeCallback& callback) = 0; | 120 const GetFileMimeTypeCallback& callback) = 0; |
| 121 protected: | 121 protected: |
| 122 virtual ~DownloadTargetDeterminerDelegate(); | 122 virtual ~DownloadTargetDeterminerDelegate(); |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_ | 125 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_ |
| OLD | NEW |