| 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 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 content::RenderFrameHost* render_frame_host, | 79 content::RenderFrameHost* render_frame_host, |
| 80 const GURL& requesting_origin, | 80 const GURL& requesting_origin, |
| 81 bool user_gesture, | 81 bool user_gesture, |
| 82 const base::Callback< | 82 const base::Callback< |
| 83 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback) | 83 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback) |
| 84 override; | 84 override; |
| 85 void CancelPermissionRequest(int request_id) override; | 85 void CancelPermissionRequest(int request_id) override; |
| 86 void ResetPermission(content::PermissionType permission, | 86 void ResetPermission(content::PermissionType permission, |
| 87 const GURL& requesting_origin, | 87 const GURL& requesting_origin, |
| 88 const GURL& embedding_origin) override; | 88 const GURL& embedding_origin) override; |
| 89 blink::mojom::PermissionStatus GetPermissionStatus( | 89 blink::mojom::PermissionStatus GetPermissionStatusForFrame( |
| 90 content::PermissionType permission, | 90 content::PermissionType permission, |
| 91 const GURL& requesting_origin, | 91 content::RenderFrameHost* render_frame_host, |
| 92 const GURL& embedding_origin) override; | 92 const GURL& requesting_origin) override; |
| 93 blink::mojom::PermissionStatus GetPermissionStatusForWorker( |
| 94 content::PermissionType permission, |
| 95 const GURL& requesting_origin) override; |
| 93 int SubscribePermissionStatusChange( | 96 int SubscribePermissionStatusChange( |
| 94 content::PermissionType permission, | 97 content::PermissionType permission, |
| 95 const GURL& requesting_origin, | 98 const GURL& requesting_origin, |
| 96 const GURL& embedding_origin, | 99 const GURL& embedding_origin, |
| 97 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) | 100 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) |
| 98 override; | 101 override; |
| 99 void UnsubscribePermissionStatusChange(int subscription_id) override; | 102 void UnsubscribePermissionStatusChange(int subscription_id) override; |
| 100 | 103 |
| 101 // TODO(raymes): Rather than exposing this, use the denial reason from | 104 // TODO(raymes): Rather than exposing this, use the denial reason from |
| 102 // GetPermissionStatus in callers to determine whether a permission is | 105 // GetPermissionStatus in callers to determine whether a permission is |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 std::unique_ptr<PermissionContextBase>, | 150 std::unique_ptr<PermissionContextBase>, |
| 148 ContentSettingsTypeHash> | 151 ContentSettingsTypeHash> |
| 149 permission_contexts_; | 152 permission_contexts_; |
| 150 | 153 |
| 151 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; | 154 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; |
| 152 | 155 |
| 153 DISALLOW_COPY_AND_ASSIGN(PermissionManager); | 156 DISALLOW_COPY_AND_ASSIGN(PermissionManager); |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 159 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
| OLD | NEW |