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

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

Issue 2945243002: Permissions: Allow PermissionManager to return more PermissionStatusSources.
Patch Set: Cleanup. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CONTEXT_BASE_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // was already cancelled by some other means. 108 // was already cancelled by some other means.
109 virtual void CancelPermissionRequest(content::WebContents* web_contents, 109 virtual void CancelPermissionRequest(content::WebContents* web_contents,
110 const PermissionRequestID& id); 110 const PermissionRequestID& id);
111 111
112 // Whether the kill switch has been enabled for this permission. 112 // Whether the kill switch has been enabled for this permission.
113 // public for permissions that do not use RequestPermission, like 113 // public for permissions that do not use RequestPermission, like
114 // camera and microphone, and for testing. 114 // camera and microphone, and for testing.
115 bool IsPermissionKillSwitchOn() const; 115 bool IsPermissionKillSwitchOn() const;
116 116
117 protected: 117 protected:
118 virtual ContentSetting GetPermissionStatusInternal( 118 virtual PermissionResult GetPermissionStatusInternal(
119 content::RenderFrameHost* render_frame_host, 119 content::RenderFrameHost* render_frame_host,
120 const GURL& requesting_origin, 120 const GURL& requesting_origin,
121 const GURL& embedding_origin) const; 121 const GURL& embedding_origin) const;
122 122
123 // Decide whether the permission should be granted. 123 // Decide whether the permission should be granted.
124 // Calls PermissionDecided if permission can be decided non-interactively, 124 // Calls PermissionDecided if permission can be decided non-interactively,
125 // or NotifyPermissionSet if permission decided by presenting an infobar. 125 // or NotifyPermissionSet if permission decided by presenting an infobar.
126 virtual void DecidePermission(content::WebContents* web_contents, 126 virtual void DecidePermission(content::WebContents* web_contents,
127 const PermissionRequestID& id, 127 const PermissionRequestID& id,
128 const GURL& requesting_origin, 128 const GURL& requesting_origin,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 #endif 214 #endif
215 std::unordered_map<std::string, std::unique_ptr<PermissionRequest>> 215 std::unordered_map<std::string, std::unique_ptr<PermissionRequest>>
216 pending_requests_; 216 pending_requests_;
217 217
218 // Must be the last member, to ensure that it will be 218 // Must be the last member, to ensure that it will be
219 // destroyed first, which will invalidate weak pointers 219 // destroyed first, which will invalidate weak pointers
220 base::WeakPtrFactory<PermissionContextBase> weak_factory_; 220 base::WeakPtrFactory<PermissionContextBase> weak_factory_;
221 }; 221 };
222 222
223 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_ 223 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_permission_context.cc ('k') | chrome/browser/permissions/permission_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698