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

Unified Diff: android_webview/browser/aw_permission_manager.h

Issue 2143573002: Implement AwPermissionManager::RequestPermissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: allow multiple requests Created 4 years, 5 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
« no previous file with comments | « android_webview/android_webview_tests.gypi ('k') | android_webview/browser/aw_permission_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_permission_manager.h
diff --git a/android_webview/browser/aw_permission_manager.h b/android_webview/browser/aw_permission_manager.h
index cfabc5f5494ca30ca70901dda5e1c3febfbbe5e9..689dab95a551708ccf29feda6dd264b5c43d3972 100644
--- a/android_webview/browser/aw_permission_manager.h
+++ b/android_webview/browser/aw_permission_manager.h
@@ -15,6 +15,7 @@
namespace android_webview {
+class AwBrowserPermissionRequestDelegate;
class LastRequestResultCache;
class AwPermissionManager : public content::PermissionManager {
@@ -57,10 +58,19 @@ class AwPermissionManager : public content::PermissionManager {
override;
void UnsubscribePermissionStatusChange(int subscription_id) override;
+ protected:
+ void CancelPermissionRequests();
+
private:
- struct PendingRequest;
+ class PendingRequest;
using PendingRequestsMap = IDMap<PendingRequest, IDMapOwnPointer>;
+ virtual int GetRenderProcessID(content::RenderFrameHost* render_frame_host);
+ virtual int GetRenderFrameID(content::RenderFrameHost* render_frame_host);
+ virtual GURL LastCommittedOrigin(content::RenderFrameHost* render_frame_host);
+ virtual AwBrowserPermissionRequestDelegate* GetDelegate(int render_process_id,
+ int render_frame_id);
+
// The weak pointer to this is used to clean up any information which is
// stored in the pending request or result cache maps. However, the callback
// should be run regardless of whether the class is still alive so the method
@@ -68,7 +78,7 @@ class AwPermissionManager : public content::PermissionManager {
static void OnRequestResponse(
const base::WeakPtr<AwPermissionManager>& manager,
int request_id,
- const base::Callback<void(blink::mojom::PermissionStatus)>& callback,
+ content::PermissionType permission,
bool allowed);
PendingRequestsMap pending_requests_;
« no previous file with comments | « android_webview/android_webview_tests.gypi ('k') | android_webview/browser/aw_permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698