OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PERMISSIONS_API_PERMISSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 kHistory, | 81 kHistory, |
82 kIdle, | 82 kIdle, |
83 kInput, | 83 kInput, |
84 kInputMethodPrivate, | 84 kInputMethodPrivate, |
85 kManagedModePrivate, | 85 kManagedModePrivate, |
86 kManagement, | 86 kManagement, |
87 kMediaGalleries, | 87 kMediaGalleries, |
88 kMediaGalleriesPrivate, | 88 kMediaGalleriesPrivate, |
89 kMediaPlayerPrivate, | 89 kMediaPlayerPrivate, |
90 kMetricsPrivate, | 90 kMetricsPrivate, |
| 91 kNativeMessaging, |
91 kNetworkingPrivate, | 92 kNetworkingPrivate, |
92 kNotification, | 93 kNotification, |
93 kPageCapture, | 94 kPageCapture, |
94 kPointerLock, | 95 kPointerLock, |
95 kPlugin, | 96 kPlugin, |
96 kPrivacy, | 97 kPrivacy, |
97 kProxy, | 98 kProxy, |
98 kPushMessaging, | 99 kPushMessaging, |
99 kRtcPrivate, | 100 kRtcPrivate, |
100 kScreensaver, | 101 kScreensaver, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 212 |
212 // Indicates if the permission implies full access (native code). | 213 // Indicates if the permission implies full access (native code). |
213 kFlagImpliesFullAccess = 1 << 0, | 214 kFlagImpliesFullAccess = 1 << 0, |
214 | 215 |
215 // Indicates if the permission implies full URL access. | 216 // Indicates if the permission implies full URL access. |
216 kFlagImpliesFullURLAccess = 1 << 1, | 217 kFlagImpliesFullURLAccess = 1 << 1, |
217 | 218 |
218 // Indicates that extensions cannot specify the permission as optional. | 219 // Indicates that extensions cannot specify the permission as optional. |
219 kFlagCannotBeOptional = 1 << 3, | 220 kFlagCannotBeOptional = 1 << 3, |
220 | 221 |
221 // Indicates that extensions cannot specify the permission as optional. | 222 // Indicates that extensions must specify the permission as optional. |
222 kFlagMustBeOptional = 1 << 4 | 223 kFlagMustBeOptional = 1 << 4 |
223 }; | 224 }; |
224 | 225 |
225 typedef APIPermission* (*APIPermissionConstructor)(const APIPermissionInfo*); | 226 typedef APIPermission* (*APIPermissionConstructor)(const APIPermissionInfo*); |
226 | 227 |
227 typedef std::set<APIPermission::ID> IDSet; | 228 typedef std::set<APIPermission::ID> IDSet; |
228 | 229 |
229 ~APIPermissionInfo(); | 230 ~APIPermissionInfo(); |
230 | 231 |
231 // Creates a APIPermission instance. | 232 // Creates a APIPermission instance. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 const char* const name_; | 292 const char* const name_; |
292 const int flags_; | 293 const int flags_; |
293 const int l10n_message_id_; | 294 const int l10n_message_id_; |
294 const PermissionMessage::ID message_id_; | 295 const PermissionMessage::ID message_id_; |
295 const APIPermissionConstructor api_permission_constructor_; | 296 const APIPermissionConstructor api_permission_constructor_; |
296 }; | 297 }; |
297 | 298 |
298 } // namespace extensions | 299 } // namespace extensions |
299 | 300 |
300 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ | 301 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ |
OLD | NEW |