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

Side by Side Diff: chrome/browser/permissions/permission_manager.h

Issue 2110343002: Reintroduce plumbing for user gesture into permission system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PERMISSIONS_PERMISSION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 21 matching lines...) Expand all
32 static PermissionManager* Get(Profile* profile); 32 static PermissionManager* Get(Profile* profile);
33 33
34 explicit PermissionManager(Profile* profile); 34 explicit PermissionManager(Profile* profile);
35 ~PermissionManager() override; 35 ~PermissionManager() override;
36 36
37 // content::PermissionManager implementation. 37 // content::PermissionManager implementation.
38 int RequestPermission( 38 int RequestPermission(
39 content::PermissionType permission, 39 content::PermissionType permission,
40 content::RenderFrameHost* render_frame_host, 40 content::RenderFrameHost* render_frame_host,
41 const GURL& requesting_origin, 41 const GURL& requesting_origin,
42 bool user_gesture,
42 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) 43 const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
43 override; 44 override;
44 int RequestPermissions( 45 int RequestPermissions(
45 const std::vector<content::PermissionType>& permissions, 46 const std::vector<content::PermissionType>& permissions,
46 content::RenderFrameHost* render_frame_host, 47 content::RenderFrameHost* render_frame_host,
47 const GURL& requesting_origin, 48 const GURL& requesting_origin,
49 bool user_gesture,
48 const base::Callback< 50 const base::Callback<
49 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback) 51 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback)
50 override; 52 override;
51 void CancelPermissionRequest(int request_id) override; 53 void CancelPermissionRequest(int request_id) override;
52 void ResetPermission(content::PermissionType permission, 54 void ResetPermission(content::PermissionType permission,
53 const GURL& requesting_origin, 55 const GURL& requesting_origin,
54 const GURL& embedding_origin) override; 56 const GURL& embedding_origin) override;
55 blink::mojom::PermissionStatus GetPermissionStatus( 57 blink::mojom::PermissionStatus GetPermissionStatus(
56 content::PermissionType permission, 58 content::PermissionType permission,
57 const GURL& requesting_origin, 59 const GURL& requesting_origin,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 std::unique_ptr<PermissionContextBase>, 108 std::unique_ptr<PermissionContextBase>,
107 PermissionTypeHash> 109 PermissionTypeHash>
108 permission_contexts_; 110 permission_contexts_;
109 111
110 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; 112 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_;
111 113
112 DISALLOW_COPY_AND_ASSIGN(PermissionManager); 114 DISALLOW_COPY_AND_ASSIGN(PermissionManager);
113 }; 115 };
114 116
115 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ 117 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_context_base_unittest.cc ('k') | chrome/browser/permissions/permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698