Chromium Code Reviews| Index: content/browser/android/download_controller_android_impl.h |
| diff --git a/content/browser/android/download_controller_android_impl.h b/content/browser/android/download_controller_android_impl.h |
| index fad2320e5d21c816e53d8bb373b44234c1773425..4cf73e79eb9e2a49682ab32159db9d7c5c901332 100644 |
| --- a/content/browser/android/download_controller_android_impl.h |
| +++ b/content/browser/android/download_controller_android_impl.h |
| @@ -54,6 +54,12 @@ class DownloadControllerAndroidImpl : public DownloadControllerAndroid, |
| // Removes a deferred download from |deferred_downloads_|. |
| void CancelDeferredDownload(DeferredDownloadObserver* observer); |
| + // DownloadControllerAndroid implementation. |
| + bool RequireUserPermissionPrompt(WebContents* web_contents) override; |
| + void PromptUserForPermission( |
| + WebContents* web_contents, |
| + const UserPermissionPromptCallback& callback) override; |
| + |
| private: |
| // Used to store all the information about an Android download. |
| struct DownloadInfoAndroid { |
| @@ -81,6 +87,11 @@ class DownloadControllerAndroidImpl : public DownloadControllerAndroid, |
| DownloadControllerAndroidImpl(); |
| ~DownloadControllerAndroidImpl() override; |
| + // Helper method for implementing PromptUserForPermission. |
| + void PromptUserForPermissionInternal( |
| + WebContents* download_item, |
|
Ted C
2015/07/06 20:03:39
this and the following line are indented 2 too muc
qinmin
2015/07/06 20:36:02
Done.
|
| + const UserPermissionPromptCallback& callback); |
| + |
| // DownloadControllerAndroid implementation. |
| void CreateGETDownload(int render_process_id, |
| int render_view_id, |
| @@ -116,6 +127,10 @@ class DownloadControllerAndroidImpl : public DownloadControllerAndroid, |
| void StartAndroidDownload(int render_process_id, |
| int render_view_id, |
| const DownloadInfoAndroid& info); |
| + void StartAndroidDownloadInternal(int render_process_id, |
| + int render_view_id, |
| + const DownloadInfoAndroid& info, |
| + bool allowed); |
| // The download item contains dangerous file types. |
| void OnDangerousDownload(DownloadItem *item); |