Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2021)

Unified Diff: content/public/browser/android/download_controller_android.h

Issue 1217223006: Prompt user for file access permission before download starts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/android/download_controller_android.h
diff --git a/content/public/browser/android/download_controller_android.h b/content/public/browser/android/download_controller_android.h
index fd035d734ec1c5bffd3b2580c8501c5f8c60b361..03edddae1c9d5c1e9b181c79bb1119bb5f87b50a 100644
--- a/content/public/browser/android/download_controller_android.h
+++ b/content/public/browser/android/download_controller_android.h
@@ -38,6 +38,19 @@ class CONTENT_EXPORT DownloadControllerAndroid {
virtual void DangerousDownloadValidated(
WebContents* web_contents, int download_id, bool accept) = 0;
+ // Returns true if prompt for file access permission is required from the
+ // user, or false otherwise.
+ virtual bool RequireUserPermissionPrompt(WebContents* web_contents) = 0;
+
+ // Callback when user permission prompt finishes.
+ typedef base::Callback<void(bool)> UserPermissionPromptCallback;
+
+ // Called to prompt the user for file access permission. When finished,
+ // |callback| will be executed.
+ virtual void PromptUserForPermission(
+ WebContents* web_contents,
+ const UserPermissionPromptCallback& callback) = 0;
+
protected:
virtual ~DownloadControllerAndroid() {};
};

Powered by Google App Engine
This is Rietveld 408576698