| 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 "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "content/public/common/context_menu_params.h" | 9 #include "content/public/common/context_menu_params.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // Called when a download is initiated by context menu. | 32 // Called when a download is initiated by context menu. |
| 33 virtual void StartContextMenuDownload( | 33 virtual void StartContextMenuDownload( |
| 34 const ContextMenuParams& params, WebContents* web_contents, | 34 const ContextMenuParams& params, WebContents* web_contents, |
| 35 bool is_link, const std::string& extra_headers) = 0; | 35 bool is_link, const std::string& extra_headers) = 0; |
| 36 | 36 |
| 37 // Called when a dangerous download item is verified or rejected. | 37 // Called when a dangerous download item is verified or rejected. |
| 38 virtual void DangerousDownloadValidated( | 38 virtual void DangerousDownloadValidated( |
| 39 WebContents* web_contents, int download_id, bool accept) = 0; | 39 WebContents* web_contents, int download_id, bool accept) = 0; |
| 40 | 40 |
| 41 // Returns true if prompt for file access permission is required from the |
| 42 // user, or false otherwise. |
| 43 virtual bool RequireUserPermissionPrompt(WebContents* web_contents) = 0; |
| 44 |
| 45 // Callback when user permission prompt finishes. |
| 46 typedef base::Callback<void(bool)> UserPermissionPromptCallback; |
| 47 |
| 48 // Called to prompt the user for file access permission. When finished, |
| 49 // |callback| will be executed. |
| 50 virtual void PromptUserForPermission( |
| 51 WebContents* web_contents, |
| 52 const UserPermissionPromptCallback& callback) = 0; |
| 53 |
| 41 protected: | 54 protected: |
| 42 virtual ~DownloadControllerAndroid() {}; | 55 virtual ~DownloadControllerAndroid() {}; |
| 43 }; | 56 }; |
| 44 | 57 |
| 45 } // namespace content | 58 } // namespace content |
| 46 | 59 |
| 47 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ | 60 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ |
| OLD | NEW |