| OLD | NEW |
| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // Browsing. |permission_blocked| determines whether to auto-block the | 187 // Browsing. |permission_blocked| determines whether to auto-block the |
| 188 // permission request without prompting the user for a decision. | 188 // permission request without prompting the user for a decision. |
| 189 void ContinueRequestPermission(content::WebContents* web_contents, | 189 void ContinueRequestPermission(content::WebContents* web_contents, |
| 190 const PermissionRequestID& id, | 190 const PermissionRequestID& id, |
| 191 const GURL& requesting_origin, | 191 const GURL& requesting_origin, |
| 192 const GURL& embedding_origin, | 192 const GURL& embedding_origin, |
| 193 bool user_gesture, | 193 bool user_gesture, |
| 194 const BrowserPermissionCallback& callback, | 194 const BrowserPermissionCallback& callback, |
| 195 bool permission_blocked); | 195 bool permission_blocked); |
| 196 | 196 |
| 197 // Called when the user has made a permission decision. This is a hook for |
| 198 // descendent classes to do appropriate things they might need to do when this |
| 199 // happens. |
| 200 virtual void UserMadePermissionDecision(const PermissionRequestID& id, |
| 201 const GURL& requesting_origin, |
| 202 const GURL& embedding_origin, |
| 203 ContentSetting content_setting); |
| 204 |
| 197 Profile* profile_; | 205 Profile* profile_; |
| 198 const ContentSettingsType content_settings_type_; | 206 const ContentSettingsType content_settings_type_; |
| 199 #if defined(OS_ANDROID) | 207 #if defined(OS_ANDROID) |
| 200 std::unique_ptr<PermissionQueueController> permission_queue_controller_; | 208 std::unique_ptr<PermissionQueueController> permission_queue_controller_; |
| 201 #endif | 209 #endif |
| 202 std::unordered_map<std::string, std::unique_ptr<PermissionRequest>> | 210 std::unordered_map<std::string, std::unique_ptr<PermissionRequest>> |
| 203 pending_requests_; | 211 pending_requests_; |
| 204 | 212 |
| 205 // Must be the last member, to ensure that it will be | 213 // Must be the last member, to ensure that it will be |
| 206 // destroyed first, which will invalidate weak pointers | 214 // destroyed first, which will invalidate weak pointers |
| 207 base::WeakPtrFactory<PermissionContextBase> weak_factory_; | 215 base::WeakPtrFactory<PermissionContextBase> weak_factory_; |
| 208 }; | 216 }; |
| 209 | 217 |
| 210 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_ | 218 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_ |
| OLD | NEW |