| 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_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 kManagement, | 38 kManagement, |
| 39 kDebugger, | 39 kDebugger, |
| 40 kHosts1, | 40 kHosts1, |
| 41 kHosts2, | 41 kHosts2, |
| 42 kHosts3, | 42 kHosts3, |
| 43 kHosts4OrMore, | 43 kHosts4OrMore, |
| 44 kHostsAll, | 44 kHostsAll, |
| 45 kFullAccess, | 45 kFullAccess, |
| 46 kClipboard, | 46 kClipboard, |
| 47 kTtsEngine, | 47 kTtsEngine, |
| 48 kNetworkServices, |
| 49 kNetworkSettings, |
| 48 kEnumBoundary | 50 kEnumBoundary |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 // Creates the corresponding permission message for a list of hosts. This is | 53 // Creates the corresponding permission message for a list of hosts. This is |
| 52 // simply a convenience method around the constructor, since the messages | 54 // simply a convenience method around the constructor, since the messages |
| 53 // change depending on what hosts are present. | 55 // change depending on what hosts are present. |
| 54 static ExtensionPermissionMessage CreateFromHostList( | 56 static ExtensionPermissionMessage CreateFromHostList( |
| 55 const std::set<std::string>& hosts); | 57 const std::set<std::string>& hosts); |
| 56 | 58 |
| 57 // Creates the corresponding permission message. | 59 // Creates the corresponding permission message. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 86 // Error codes. | 88 // Error codes. |
| 87 kInvalid = -2, | 89 kInvalid = -2, |
| 88 kUnknown = -1, | 90 kUnknown = -1, |
| 89 | 91 |
| 90 // Default permission that every extension has implicitly. | 92 // Default permission that every extension has implicitly. |
| 91 kDefault, | 93 kDefault, |
| 92 | 94 |
| 93 // Real permissions. | 95 // Real permissions. |
| 94 kBackground, | 96 kBackground, |
| 95 kBookmark, | 97 kBookmark, |
| 98 kChromeAuthPrivate, |
| 99 kChromePrivate, |
| 100 kChromeosInfoPrivate, |
| 96 kClipboardRead, | 101 kClipboardRead, |
| 97 kClipboardWrite, | 102 kClipboardWrite, |
| 98 kContentSettings, | 103 kContentSettings, |
| 99 kContextMenus, | 104 kContextMenus, |
| 100 kCookie, | 105 kCookie, |
| 101 kChromeAuthPrivate, | |
| 102 kChromePrivate, | |
| 103 kChromeosInfoPrivate, | |
| 104 kDebugger, | 106 kDebugger, |
| 107 kDevtools, |
| 105 kExperimental, | 108 kExperimental, |
| 106 kFileBrowserHandler, | 109 kFileBrowserHandler, |
| 107 kFileBrowserPrivate, | 110 kFileBrowserPrivate, |
| 108 kGeolocation, | 111 kGeolocation, |
| 109 kHistory, | 112 kHistory, |
| 110 kIdle, | 113 kIdle, |
| 111 kInputMethodPrivate, | 114 kInputMethodPrivate, |
| 112 kManagement, | 115 kManagement, |
| 113 kMediaPlayerPrivate, | 116 kMediaPlayerPrivate, |
| 117 kNetworkServices, |
| 118 kNetworkSettings, |
| 114 kNotification, | 119 kNotification, |
| 120 kPlugin, |
| 115 kProxy, | 121 kProxy, |
| 116 kTab, | 122 kTab, |
| 117 kTts, | 123 kTts, |
| 118 kTtsEngine, | 124 kTtsEngine, |
| 119 kUnlimitedStorage, | 125 kUnlimitedStorage, |
| 120 kWebSocketProxyPrivate, | 126 kWebSocketProxyPrivate, |
| 121 kWebstorePrivate, | 127 kWebstorePrivate, |
| 122 kDevtools, | |
| 123 kPlugin, | |
| 124 kEnumBoundary | 128 kEnumBoundary |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 typedef std::set<ID> IDSet; | 131 typedef std::set<ID> IDSet; |
| 128 | 132 |
| 129 ~ExtensionAPIPermission(); | 133 ~ExtensionAPIPermission(); |
| 130 | 134 |
| 131 // Returns the localized permission message associated with this api. | 135 // Returns the localized permission message associated with this api. |
| 132 ExtensionPermissionMessage GetMessage() const; | 136 ExtensionPermissionMessage GetMessage() const; |
| 133 | 137 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 URLPatternSet explicit_hosts_; | 387 URLPatternSet explicit_hosts_; |
| 384 | 388 |
| 385 // The list of hosts that can be scripted by content scripts. | 389 // The list of hosts that can be scripted by content scripts. |
| 386 URLPatternSet scriptable_hosts_; | 390 URLPatternSet scriptable_hosts_; |
| 387 | 391 |
| 388 // The list of hosts this effectively grants access to. | 392 // The list of hosts this effectively grants access to. |
| 389 URLPatternSet effective_hosts_; | 393 URLPatternSet effective_hosts_; |
| 390 }; | 394 }; |
| 391 | 395 |
| 392 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ | 396 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_PERMISSION_SET_H_ |
| OLD | NEW |