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_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ |
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/download_item.h" | 10 #include "content/public/browser/download_item.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Called to prompt the user for file access permission. When finished, | 51 // Called to prompt the user for file access permission. When finished, |
52 // |callback| will be executed. | 52 // |callback| will be executed. |
53 virtual void AcquireFileAccessPermission( | 53 virtual void AcquireFileAccessPermission( |
54 WebContents* web_contents, | 54 WebContents* web_contents, |
55 const AcquireFileAccessPermissionCallback& callback) = 0; | 55 const AcquireFileAccessPermissionCallback& callback) = 0; |
56 | 56 |
57 // Called by unit test to approve or disapprove file access request. | 57 // Called by unit test to approve or disapprove file access request. |
58 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}; | 58 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}; |
59 | 59 |
| 60 // Called to set the default download file name if it cannot be resolved |
| 61 // from url and content disposition |
| 62 virtual void SetDefaultDownloadFileName(const std::string& file_name) {} |
| 63 |
60 protected: | 64 protected: |
61 ~DownloadControllerAndroid() override {}; | 65 ~DownloadControllerAndroid() override {}; |
62 static DownloadControllerAndroid* download_controller_; | 66 static DownloadControllerAndroid* download_controller_; |
63 }; | 67 }; |
64 | 68 |
65 } // namespace content | 69 } // namespace content |
66 | 70 |
67 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ | 71 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ |
OLD | NEW |