| 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/permissions_info.h" | 7 #include "chrome/common/extensions/permissions/permissions_info.h" |
| 8 #include "chrome/common/extensions/permissions/socket_permission.h" | 8 #include "chrome/common/extensions/permissions/socket_permission.h" |
| 9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 { APIPermission::kPushMessaging, "pushMessaging", kFlagCannotBeOptional }, | 322 { APIPermission::kPushMessaging, "pushMessaging", kFlagCannotBeOptional }, |
| 323 { APIPermission::kBluetooth, "bluetooth", kFlagNone, | 323 { APIPermission::kBluetooth, "bluetooth", kFlagNone, |
| 324 IDS_EXTENSION_PROMPT_WARNING_BLUETOOTH, | 324 IDS_EXTENSION_PROMPT_WARNING_BLUETOOTH, |
| 325 PermissionMessage::kBluetooth }, | 325 PermissionMessage::kBluetooth }, |
| 326 { APIPermission::kUsb, "usb", kFlagNone, | 326 { APIPermission::kUsb, "usb", kFlagNone, |
| 327 IDS_EXTENSION_PROMPT_WARNING_USB, | 327 IDS_EXTENSION_PROMPT_WARNING_USB, |
| 328 PermissionMessage::kUsb }, | 328 PermissionMessage::kUsb }, |
| 329 { APIPermission::kSystemIndicator, "systemIndicator", kFlagNone, | 329 { APIPermission::kSystemIndicator, "systemIndicator", kFlagNone, |
| 330 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, | 330 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, |
| 331 PermissionMessage::kSystemIndicator }, | 331 PermissionMessage::kSystemIndicator }, |
| 332 { APIPermission::kPointerLock, "pointerLock" }, |
| 332 }; | 333 }; |
| 333 | 334 |
| 334 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { | 335 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { |
| 335 const PermissionRegistration& pr = PermissionsToRegister[i]; | 336 const PermissionRegistration& pr = PermissionsToRegister[i]; |
| 336 info->RegisterPermission( | 337 info->RegisterPermission( |
| 337 pr.id, pr.name, pr.l10n_message_id, | 338 pr.id, pr.name, pr.l10n_message_id, |
| 338 pr.message_id ? pr.message_id : PermissionMessage::kNone, | 339 pr.message_id ? pr.message_id : PermissionMessage::kNone, |
| 339 pr.flags, | 340 pr.flags, |
| 340 pr.constructor); | 341 pr.constructor); |
| 341 } | 342 } |
| 342 | 343 |
| 343 // Register aliases. | 344 // Register aliases. |
| 344 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); | 345 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); |
| 345 info->RegisterAlias("tabs", kWindowsPermission); | 346 info->RegisterAlias("tabs", kWindowsPermission); |
| 346 } | 347 } |
| 347 | 348 |
| 348 } // namespace extensions | 349 } // namespace extensions |
| OLD | NEW |