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

Side by Side Diff: chrome/browser/android/download/download_controller_base.h

Issue 2850223002: remove reliance on webcontents when requesting storage permission (Closed)
Patch Set: fix mock class Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 content::WebContents* web_contents, 65 content::WebContents* web_contents,
66 bool is_link, const std::string& extra_headers) = 0; 66 bool is_link, const std::string& extra_headers) = 0;
67 67
68 // Callback when user permission prompt finishes. Args: whether file access 68 // Callback when user permission prompt finishes. Args: whether file access
69 // permission is acquired. 69 // permission is acquired.
70 typedef base::Callback<void(bool)> AcquireFileAccessPermissionCallback; 70 typedef base::Callback<void(bool)> AcquireFileAccessPermissionCallback;
71 71
72 // Called to prompt the user for file access permission. When finished, 72 // Called to prompt the user for file access permission. When finished,
73 // |callback| will be executed. 73 // |callback| will be executed.
74 virtual void AcquireFileAccessPermission( 74 virtual void AcquireFileAccessPermission(
75 content::WebContents* web_contents, 75 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
76 const AcquireFileAccessPermissionCallback& callback) = 0; 76 const AcquireFileAccessPermissionCallback& callback) = 0;
77 77
78 // Called by unit test to approve or disapprove file access request. 78 // Called by unit test to approve or disapprove file access request.
79 virtual void SetApproveFileAccessRequestForTesting(bool approve) {} 79 virtual void SetApproveFileAccessRequestForTesting(bool approve) {}
80 80
81 // Starts a new download request with Android DownloadManager. 81 // Starts a new download request with Android DownloadManager.
82 virtual void CreateAndroidDownload( 82 virtual void CreateAndroidDownload(
83 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, 83 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
84 const DownloadInfo& info) = 0; 84 const DownloadInfo& info) = 0;
85 85
86 protected: 86 protected:
87 ~DownloadControllerBase() override {} 87 ~DownloadControllerBase() override {}
88 static DownloadControllerBase* download_controller_; 88 static DownloadControllerBase* download_controller_;
89 }; 89 };
90 90
91 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_ 91 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/download/download_controller.cc ('k') | chrome/browser/android/download/mock_download_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698