Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "content/public/common/permission_status.mojom.h" | 9 #include "content/public/common/permission_status.mojom.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // succeeded, the |callback| will be run. | 26 // succeeded, the |callback| will be run. |
| 27 // Returns a request id which can be used to cancel the permission (see | 27 // Returns a request id which can be used to cancel the permission (see |
| 28 // CancelPermissionRequest | 28 // CancelPermissionRequest |
| 29 virtual int RequestPermission( | 29 virtual int RequestPermission( |
| 30 PermissionType permission, | 30 PermissionType permission, |
| 31 RenderFrameHost* render_frame_host, | 31 RenderFrameHost* render_frame_host, |
| 32 const GURL& requesting_origin, | 32 const GURL& requesting_origin, |
| 33 bool user_gesture, | 33 bool user_gesture, |
| 34 const base::Callback<void(PermissionStatus)>& callback) = 0; | 34 const base::Callback<void(PermissionStatus)>& callback) = 0; |
| 35 | 35 |
| 36 // Requests multiple permissions on behalf of a frame identified by | |
| 37 // render_frame_host. | |
| 38 // When the permission request is handled, whether it failed, timed out or | |
| 39 // succeeded, the |callback| will be run. | |
| 40 // Returns a request id which can be used to cancel the request (see | |
| 41 // CancelPermissionRequest). | |
|
mlamouri (slow - plz ping)
2015/09/16 15:08:09
nit: mention the NO_PENDING_REQUEST constant.
Als
Lalit Maganti
2015/09/16 17:21:19
Done.
| |
| 42 virtual int RequestPermissions( | |
| 43 const std::vector<PermissionType>& permission, | |
| 44 RenderFrameHost* render_frame_host, | |
| 45 const GURL& requesting_origin, | |
| 46 bool user_gesture, | |
| 47 const base::Callback<void( | |
| 48 const std::vector<PermissionStatus>&)>& callback) = 0; | |
|
mlamouri (slow - plz ping)
2015/09/16 15:08:09
You are still missing the update to aw_permission_
Lalit Maganti
2015/09/16 17:21:18
Good point. Should I implement it properly? If so
| |
| 49 | |
| 36 // Cancels a previous permission request specified by |request_id|. | 50 // Cancels a previous permission request specified by |request_id|. |
| 37 virtual void CancelPermissionRequest(RenderFrameHost* render_frame_host, | 51 virtual void CancelPermissionRequest(RenderFrameHost* render_frame_host, |
| 38 int request_id) = 0; | 52 int request_id) = 0; |
| 39 | 53 |
| 40 // Returns the permission status of a given requesting_origin/embedding_origin | 54 // Returns the permission status of a given requesting_origin/embedding_origin |
| 41 // tuple. This is not taking a RenderFrameHost because the call might happen | 55 // tuple. This is not taking a RenderFrameHost because the call might happen |
| 42 // outside of a frame context. | 56 // outside of a frame context. |
| 43 virtual PermissionStatus GetPermissionStatus( | 57 virtual PermissionStatus GetPermissionStatus( |
| 44 PermissionType permission, | 58 PermissionType permission, |
| 45 const GURL& requesting_origin, | 59 const GURL& requesting_origin, |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 68 | 82 |
| 69 // Unregisters from permission status change notifications. | 83 // Unregisters from permission status change notifications. |
| 70 // The |subscription_id| must match the value returned by the | 84 // The |subscription_id| must match the value returned by the |
| 71 // SubscribePermissionStatusChange call. | 85 // SubscribePermissionStatusChange call. |
| 72 virtual void UnsubscribePermissionStatusChange(int subscription_id) = 0; | 86 virtual void UnsubscribePermissionStatusChange(int subscription_id) = 0; |
| 73 }; | 87 }; |
| 74 | 88 |
| 75 } // namespace content | 89 } // namespace content |
| 76 | 90 |
| 77 #endif // CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ | 91 #endif // CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ |
| OLD | NEW |