| 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 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const PermissionRequestID& id, | 108 const PermissionRequestID& id, |
| 109 const GURL& requesting_origin, | 109 const GURL& requesting_origin, |
| 110 const GURL& embedding_origin, | 110 const GURL& embedding_origin, |
| 111 bool user_gesture, | 111 bool user_gesture, |
| 112 const BrowserPermissionCallback& callback); | 112 const BrowserPermissionCallback& callback); |
| 113 | 113 |
| 114 // Called when permission is granted without interactively asking the user. | 114 // Called when permission is granted without interactively asking the user. |
| 115 void PermissionDecided(const PermissionRequestID& id, | 115 void PermissionDecided(const PermissionRequestID& id, |
| 116 const GURL& requesting_origin, | 116 const GURL& requesting_origin, |
| 117 const GURL& embedding_origin, | 117 const GURL& embedding_origin, |
| 118 bool user_gesture, |
| 118 const BrowserPermissionCallback& callback, | 119 const BrowserPermissionCallback& callback, |
| 119 bool persist, | 120 bool persist, |
| 120 ContentSetting content_setting); | 121 ContentSetting content_setting); |
| 121 | 122 |
| 122 virtual void NotifyPermissionSet(const PermissionRequestID& id, | 123 virtual void NotifyPermissionSet(const PermissionRequestID& id, |
| 123 const GURL& requesting_origin, | 124 const GURL& requesting_origin, |
| 124 const GURL& embedding_origin, | 125 const GURL& embedding_origin, |
| 125 const BrowserPermissionCallback& callback, | 126 const BrowserPermissionCallback& callback, |
| 126 bool persist, | 127 bool persist, |
| 127 ContentSetting content_setting); | 128 ContentSetting content_setting); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 #endif | 168 #endif |
| 168 base::ScopedPtrHashMap<std::string, std::unique_ptr<PermissionRequest>> | 169 base::ScopedPtrHashMap<std::string, std::unique_ptr<PermissionRequest>> |
| 169 pending_requests_; | 170 pending_requests_; |
| 170 | 171 |
| 171 // Must be the last member, to ensure that it will be | 172 // Must be the last member, to ensure that it will be |
| 172 // destroyed first, which will invalidate weak pointers | 173 // destroyed first, which will invalidate weak pointers |
| 173 base::WeakPtrFactory<PermissionContextBase> weak_factory_; | 174 base::WeakPtrFactory<PermissionContextBase> weak_factory_; |
| 174 }; | 175 }; |
| 175 | 176 |
| 176 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_ | 177 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_CONTEXT_BASE_H_ |
| OLD | NEW |