OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // This passes ownership of the returned set to the caller. | 180 // This passes ownership of the returned set to the caller. |
181 ExtensionPermissionSet* GetGrantedPermissions( | 181 ExtensionPermissionSet* GetGrantedPermissions( |
182 const std::string& extension_id); | 182 const std::string& extension_id); |
183 | 183 |
184 // Adds |permissions| to the granted permissions set for the extension with | 184 // Adds |permissions| to the granted permissions set for the extension with |
185 // |extension_id|. The new granted permissions set will be the union of | 185 // |extension_id|. The new granted permissions set will be the union of |
186 // |permissions| and the already granted permissions. | 186 // |permissions| and the already granted permissions. |
187 void AddGrantedPermissions(const std::string& extension_id, | 187 void AddGrantedPermissions(const std::string& extension_id, |
188 const ExtensionPermissionSet* permissions); | 188 const ExtensionPermissionSet* permissions); |
189 | 189 |
| 190 // Gets the active permission set for the specified extension. This may |
| 191 // differ from the permissions in the manifest due to the optional |
| 192 // permissions API. |
| 193 ExtensionPermissionSet* GetActivePermissions( |
| 194 const std::string& extension_id); |
| 195 |
| 196 // Sets the active |permissions| for the extension with |extension_id|. |
| 197 void SetActivePermissions(const std::string& extension_id, |
| 198 const ExtensionPermissionSet* permissions); |
| 199 |
190 // Returns true if the user enabled this extension to be loaded in incognito | 200 // Returns true if the user enabled this extension to be loaded in incognito |
191 // mode. | 201 // mode. |
192 bool IsIncognitoEnabled(const std::string& extension_id); | 202 bool IsIncognitoEnabled(const std::string& extension_id); |
193 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); | 203 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); |
194 | 204 |
195 // Returns true if the user has chosen to allow this extension to inject | 205 // Returns true if the user has chosen to allow this extension to inject |
196 // scripts into pages with file URLs. | 206 // scripts into pages with file URLs. |
197 bool AllowFileAccess(const std::string& extension_id); | 207 bool AllowFileAccess(const std::string& extension_id); |
198 void SetAllowFileAccess(const std::string& extension_id, bool allow); | 208 void SetAllowFileAccess(const std::string& extension_id, bool allow); |
199 bool HasAllowFileAccessSetting(const std::string& extension_id) const; | 209 bool HasAllowFileAccessSetting(const std::string& extension_id) const; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 458 |
449 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; | 459 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; |
450 | 460 |
451 // The URLs of all of the toolstrips. | 461 // The URLs of all of the toolstrips. |
452 URLList shelf_order_; | 462 URLList shelf_order_; |
453 | 463 |
454 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 464 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
455 }; | 465 }; |
456 | 466 |
457 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 467 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |