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 int render_process_id, | 53 WebContents* web_contents, |
54 int render_view_id, | |
55 const AcquireFileAccessPermissionCallback& callback) = 0; | 54 const AcquireFileAccessPermissionCallback& callback) = 0; |
56 | 55 |
57 // Called by unit test to approve or disapprove file access request. | 56 // Called by unit test to approve or disapprove file access request. |
58 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}; | 57 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}; |
59 | 58 |
60 protected: | 59 protected: |
61 virtual ~DownloadControllerAndroid() {}; | 60 virtual ~DownloadControllerAndroid() {}; |
62 static DownloadControllerAndroid* download_controller_; | 61 static DownloadControllerAndroid* download_controller_; |
63 }; | 62 }; |
64 | 63 |
65 } // namespace content | 64 } // namespace content |
66 | 65 |
67 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ | 66 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ |
OLD | NEW |