| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 "mediaGalleries.allAutoDetected", kFlagNone, | 319 "mediaGalleries.allAutoDetected", kFlagNone, |
| 320 IDS_EXTENSION_PROMPT_WARNING_MEDIA_GALLERIES_ALL_GALLERIES, | 320 IDS_EXTENSION_PROMPT_WARNING_MEDIA_GALLERIES_ALL_GALLERIES, |
| 321 PermissionMessage::kMediaGalleriesAllGalleries }, | 321 PermissionMessage::kMediaGalleriesAllGalleries }, |
| 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" }, |
| 329 }; | 330 }; |
| 330 | 331 |
| 331 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { | 332 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { |
| 332 const PermissionRegistration& pr = PermissionsToRegister[i]; | 333 const PermissionRegistration& pr = PermissionsToRegister[i]; |
| 333 info->RegisterPermission( | 334 info->RegisterPermission( |
| 334 pr.id, pr.name, pr.l10n_message_id, | 335 pr.id, pr.name, pr.l10n_message_id, |
| 335 pr.message_id ? pr.message_id : PermissionMessage::kNone, | 336 pr.message_id ? pr.message_id : PermissionMessage::kNone, |
| 336 pr.flags, | 337 pr.flags, |
| 337 pr.constructor); | 338 pr.constructor); |
| 338 } | 339 } |
| 339 | 340 |
| 340 // Register aliases. | 341 // Register aliases. |
| 341 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); | 342 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); |
| 342 info->RegisterAlias("tabs", kWindowsPermission); | 343 info->RegisterAlias("tabs", kWindowsPermission); |
| 343 } | 344 } |
| 344 | 345 |
| 345 } // namespace extensions | 346 } // namespace extensions |
| OLD | NEW |