| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ | 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Called to prompt the user for file access permission. When finished, | 82 // Called to prompt the user for file access permission. When finished, |
| 83 // |callback| will be executed. | 83 // |callback| will be executed. |
| 84 virtual void AcquireFileAccessPermission( | 84 virtual void AcquireFileAccessPermission( |
| 85 content::WebContents* web_contents, | 85 content::WebContents* web_contents, |
| 86 const AcquireFileAccessPermissionCallback& callback) = 0; | 86 const AcquireFileAccessPermissionCallback& callback) = 0; |
| 87 | 87 |
| 88 // Called by unit test to approve or disapprove file access request. | 88 // Called by unit test to approve or disapprove file access request. |
| 89 virtual void SetApproveFileAccessRequestForTesting(bool approve) {} | 89 virtual void SetApproveFileAccessRequestForTesting(bool approve) {} |
| 90 | 90 |
| 91 // Called to set the default download file name if it cannot be resolved | |
| 92 // from url and content disposition | |
| 93 virtual void SetDefaultDownloadFileName(const std::string& file_name) {} | |
| 94 | |
| 95 protected: | 91 protected: |
| 96 ~DownloadControllerBase() override {} | 92 ~DownloadControllerBase() override {} |
| 97 static DownloadControllerBase* download_controller_; | 93 static DownloadControllerBase* download_controller_; |
| 98 }; | 94 }; |
| 99 | 95 |
| 100 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ | 96 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ |
| OLD | NEW |