| 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/common/context_menu_params.h" | 10 #include "content/public/common/context_menu_params.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 virtual void DangerousDownloadValidated( | 43 virtual void DangerousDownloadValidated( |
| 44 WebContents* web_contents, int download_id, bool accept) = 0; | 44 WebContents* web_contents, int download_id, bool accept) = 0; |
| 45 | 45 |
| 46 // Callback when user permission prompt finishes. Args: whether file access | 46 // Callback when user permission prompt finishes. Args: whether file access |
| 47 // permission is acquired. | 47 // permission is acquired. |
| 48 typedef base::Callback<void(bool)> AcquireFileAccessPermissionCallback; | 48 typedef base::Callback<void(bool)> AcquireFileAccessPermissionCallback; |
| 49 | 49 |
| 50 // Called to prompt the user for file access permission. When finished, | 50 // Called to prompt the user for file access permission. When finished, |
| 51 // |callback| will be executed. | 51 // |callback| will be executed. |
| 52 virtual void AcquireFileAccessPermission( | 52 virtual void AcquireFileAccessPermission( |
| 53 WebContents* web_contents, | 53 int render_process_id, |
| 54 int render_view_id, |
| 54 const AcquireFileAccessPermissionCallback& callback) = 0; | 55 const AcquireFileAccessPermissionCallback& callback) = 0; |
| 55 | 56 |
| 56 // Called by unit test to approve or disapprove file access request. | 57 // Called by unit test to approve or disapprove file access request. |
| 57 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}; | 58 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}; |
| 58 | 59 |
| 59 protected: | 60 protected: |
| 60 virtual ~DownloadControllerAndroid() {}; | 61 virtual ~DownloadControllerAndroid() {}; |
| 61 static DownloadControllerAndroid* download_controller_; | 62 static DownloadControllerAndroid* download_controller_; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace content | 65 } // namespace content |
| 65 | 66 |
| 66 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ | 67 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ |
| OLD | NEW |