OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" | 5 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" |
6 | 6 |
7 #include "chrome/common/extensions/permissions/api_permission.h" | 7 #include "chrome/common/extensions/permissions/api_permission.h" |
8 #include "chrome/common/extensions/permissions/api_permission_set.h" | 8 #include "chrome/common/extensions/permissions/api_permission_set.h" |
9 #include "chrome/common/extensions/permissions/bluetooth_permission.h" | 9 #include "chrome/common/extensions/permissions/bluetooth_permission.h" |
10 #include "chrome/common/extensions/permissions/media_galleries_permission.h" | 10 #include "chrome/common/extensions/permissions/media_galleries_permission.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 { APIPermission::kAppRuntime, "app.runtime" }, | 261 { APIPermission::kAppRuntime, "app.runtime" }, |
262 { APIPermission::kAppWindow, "app.window" }, | 262 { APIPermission::kAppWindow, "app.window" }, |
263 { APIPermission::kAudioCapture, "audioCapture", | 263 { APIPermission::kAudioCapture, "audioCapture", |
264 APIPermissionInfo::kFlagNone, | 264 APIPermissionInfo::kFlagNone, |
265 IDS_EXTENSION_PROMPT_WARNING_AUDIO_CAPTURE, | 265 IDS_EXTENSION_PROMPT_WARNING_AUDIO_CAPTURE, |
266 PermissionMessage::kAudioCapture }, | 266 PermissionMessage::kAudioCapture }, |
267 { APIPermission::kVideoCapture, "videoCapture", | 267 { APIPermission::kVideoCapture, "videoCapture", |
268 APIPermissionInfo::kFlagNone, | 268 APIPermissionInfo::kFlagNone, |
269 IDS_EXTENSION_PROMPT_WARNING_VIDEO_CAPTURE, | 269 IDS_EXTENSION_PROMPT_WARNING_VIDEO_CAPTURE, |
270 PermissionMessage::kVideoCapture }, | 270 PermissionMessage::kVideoCapture }, |
271 // The permission string for "fileSystem" is only shown when "write" is | 271 // The permission string for "fileSystem" is only shown when "write" or |
272 // present. Read-only access is only granted after the user has been shown | 272 // "directory" is present. Read-only access is only granted after the user |
273 // a file chooser dialog and selected a file. Selecting the file is | 273 // has been shown a file or directory chooser dialog and selected a file or |
274 // considered consent to read it. | 274 // directory . Selecting the file or directory is considered consent to |
| 275 // read it. |
275 { APIPermission::kFileSystem, "fileSystem" }, | 276 { APIPermission::kFileSystem, "fileSystem" }, |
| 277 { APIPermission::kFileSystemDirectory, "fileSystem.directory", |
| 278 APIPermissionInfo::kFlagNone, |
| 279 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_DIRECTORY, |
| 280 PermissionMessage::kFileSystemDirectory }, |
276 { APIPermission::kFileSystemRetainEntries, "fileSystem.retainEntries" }, | 281 { APIPermission::kFileSystemRetainEntries, "fileSystem.retainEntries" }, |
277 { APIPermission::kFileSystemWrite, "fileSystem.write", | 282 { APIPermission::kFileSystemWrite, "fileSystem.write", |
278 APIPermissionInfo::kFlagNone, | 283 APIPermissionInfo::kFlagNone, |
279 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE, | 284 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE, |
280 PermissionMessage::kFileSystemWrite }, | 285 PermissionMessage::kFileSystemWrite }, |
281 // Because warning messages for the "mediaGalleries" permission vary based | 286 // Because warning messages for the "mediaGalleries" permission vary based |
282 // on the permissions parameters, no message ID or message text is | 287 // on the permissions parameters, no message ID or message text is |
283 // specified here. | 288 // specified here. |
284 // The message ID and text used will be determined at run-time in the | 289 // The message ID and text used will be determined at run-time in the |
285 // |MediaGalleriesPermission| class. | 290 // |MediaGalleriesPermission| class. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // Register aliases. | 338 // Register aliases. |
334 std::vector<PermissionsProvider::AliasInfo> aliases; | 339 std::vector<PermissionsProvider::AliasInfo> aliases; |
335 aliases.push_back(PermissionsProvider::AliasInfo( | 340 aliases.push_back(PermissionsProvider::AliasInfo( |
336 "unlimitedStorage", kOldUnlimitedStoragePermission)); | 341 "unlimitedStorage", kOldUnlimitedStoragePermission)); |
337 aliases.push_back(PermissionsProvider::AliasInfo( | 342 aliases.push_back(PermissionsProvider::AliasInfo( |
338 "tabs", kWindowsPermission)); | 343 "tabs", kWindowsPermission)); |
339 return aliases; | 344 return aliases; |
340 } | 345 } |
341 | 346 |
342 } // namespace extensions | 347 } // namespace extensions |
OLD | NEW |