| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 &::CreateAPIPermission<BluetoothDevicePermission> }, | 343 &::CreateAPIPermission<BluetoothDevicePermission> }, |
| 344 { APIPermission::kUsb, "usb", kFlagNone, | 344 { APIPermission::kUsb, "usb", kFlagNone, |
| 345 IDS_EXTENSION_PROMPT_WARNING_USB, | 345 IDS_EXTENSION_PROMPT_WARNING_USB, |
| 346 PermissionMessage::kUsb }, | 346 PermissionMessage::kUsb }, |
| 347 { APIPermission::kUsbDevice, "usbDevices", | 347 { APIPermission::kUsbDevice, "usbDevices", |
| 348 kFlagMustBeOptional, 0, PermissionMessage::kNone, | 348 kFlagMustBeOptional, 0, PermissionMessage::kNone, |
| 349 &::CreateAPIPermission<UsbDevicePermission> }, | 349 &::CreateAPIPermission<UsbDevicePermission> }, |
| 350 { APIPermission::kSystemIndicator, "systemIndicator", kFlagNone, | 350 { APIPermission::kSystemIndicator, "systemIndicator", kFlagNone, |
| 351 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, | 351 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, |
| 352 PermissionMessage::kSystemIndicator }, | 352 PermissionMessage::kSystemIndicator }, |
| 353 { APIPermission::kSystemInfoDisplay, "systemInfo.display" }, |
| 353 { APIPermission::kPointerLock, "pointerLock" }, | 354 { APIPermission::kPointerLock, "pointerLock" }, |
| 354 }; | 355 }; |
| 355 | 356 |
| 356 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { | 357 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { |
| 357 const PermissionRegistration& pr = PermissionsToRegister[i]; | 358 const PermissionRegistration& pr = PermissionsToRegister[i]; |
| 358 info->RegisterPermission( | 359 info->RegisterPermission( |
| 359 pr.id, pr.name, pr.l10n_message_id, | 360 pr.id, pr.name, pr.l10n_message_id, |
| 360 pr.message_id ? pr.message_id : PermissionMessage::kNone, | 361 pr.message_id ? pr.message_id : PermissionMessage::kNone, |
| 361 pr.flags, | 362 pr.flags, |
| 362 pr.constructor); | 363 pr.constructor); |
| 363 } | 364 } |
| 364 | 365 |
| 365 // Register aliases. | 366 // Register aliases. |
| 366 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); | 367 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); |
| 367 info->RegisterAlias("tabs", kWindowsPermission); | 368 info->RegisterAlias("tabs", kWindowsPermission); |
| 368 } | 369 } |
| 369 | 370 |
| 370 } // namespace extensions | 371 } // namespace extensions |
| OLD | NEW |