| 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 #include "chrome/common/extensions/permissions/api_permission.h" | 5 #include "chrome/common/extensions/permissions/api_permission.h" |
| 6 | 6 |
| 7 #include "chrome/common/extensions/permissions/bluetooth_device_permission.h" | 7 #include "chrome/common/extensions/permissions/bluetooth_device_permission.h" |
| 8 #include "chrome/common/extensions/permissions/media_galleries_permission.h" | 8 #include "chrome/common/extensions/permissions/media_galleries_permission.h" |
| 9 #include "chrome/common/extensions/permissions/permissions_info.h" | 9 #include "chrome/common/extensions/permissions/permissions_info.h" |
| 10 #include "chrome/common/extensions/permissions/socket_permission.h" | 10 #include "chrome/common/extensions/permissions/socket_permission.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 IDS_EXTENSION_PROMPT_WARNING_USB, | 347 IDS_EXTENSION_PROMPT_WARNING_USB, |
| 348 PermissionMessage::kUsb }, | 348 PermissionMessage::kUsb }, |
| 349 { APIPermission::kUsbDevice, "usbDevices", | 349 { APIPermission::kUsbDevice, "usbDevices", |
| 350 kFlagMustBeOptional, 0, PermissionMessage::kNone, | 350 kFlagMustBeOptional, 0, PermissionMessage::kNone, |
| 351 &::CreateAPIPermission<UsbDevicePermission> }, | 351 &::CreateAPIPermission<UsbDevicePermission> }, |
| 352 { APIPermission::kSystemIndicator, "systemIndicator", kFlagNone, | 352 { APIPermission::kSystemIndicator, "systemIndicator", kFlagNone, |
| 353 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, | 353 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, |
| 354 PermissionMessage::kSystemIndicator }, | 354 PermissionMessage::kSystemIndicator }, |
| 355 { APIPermission::kSystemInfoDisplay, "systemInfo.display" }, | 355 { APIPermission::kSystemInfoDisplay, "systemInfo.display" }, |
| 356 { APIPermission::kPointerLock, "pointerLock" }, | 356 { APIPermission::kPointerLock, "pointerLock" }, |
| 357 { APIPermission::kFullscreen, "fullscreen" }, |
| 357 }; | 358 }; |
| 358 | 359 |
| 359 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { | 360 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { |
| 360 const PermissionRegistration& pr = PermissionsToRegister[i]; | 361 const PermissionRegistration& pr = PermissionsToRegister[i]; |
| 361 info->RegisterPermission( | 362 info->RegisterPermission( |
| 362 pr.id, pr.name, pr.l10n_message_id, | 363 pr.id, pr.name, pr.l10n_message_id, |
| 363 pr.message_id ? pr.message_id : PermissionMessage::kNone, | 364 pr.message_id ? pr.message_id : PermissionMessage::kNone, |
| 364 pr.flags, | 365 pr.flags, |
| 365 pr.constructor); | 366 pr.constructor); |
| 366 } | 367 } |
| 367 | 368 |
| 368 // Register aliases. | 369 // Register aliases. |
| 369 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); | 370 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); |
| 370 info->RegisterAlias("tabs", kWindowsPermission); | 371 info->RegisterAlias("tabs", kWindowsPermission); |
| 371 } | 372 } |
| 372 | 373 |
| 373 } // namespace extensions | 374 } // namespace extensions |
| OLD | NEW |