| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/common/permissions/extensions_api_permissions.h" | 5 #include "extensions/common/permissions/extensions_api_permissions.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "extensions/common/permissions/api_permission.h" | 9 #include "extensions/common/permissions/api_permission.h" |
| 10 #include "extensions/common/permissions/permission_message.h" | 10 #include "extensions/common/permissions/permission_message.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // appear in the install permission dialogue, so we need a fake | 71 // appear in the install permission dialogue, so we need a fake |
| 72 // permission for it. See http://crbug.com/247857. | 72 // permission for it. See http://crbug.com/247857. |
| 73 {APIPermission::kWebConnectable, "webConnectable", | 73 {APIPermission::kWebConnectable, "webConnectable", |
| 74 APIPermissionInfo::kFlagCannotBeOptional | | 74 APIPermissionInfo::kFlagCannotBeOptional | |
| 75 APIPermissionInfo::kFlagInternal, | 75 APIPermissionInfo::kFlagInternal, |
| 76 IDS_EXTENSION_PROMPT_WARNING_WEB_CONNECTABLE, | 76 IDS_EXTENSION_PROMPT_WARNING_WEB_CONNECTABLE, |
| 77 PermissionMessage::kWebConnectable}, | 77 PermissionMessage::kWebConnectable}, |
| 78 {APIPermission::kWebView, "webview", | 78 {APIPermission::kWebView, "webview", |
| 79 APIPermissionInfo::kFlagCannotBeOptional}, | 79 APIPermissionInfo::kFlagCannotBeOptional}, |
| 80 {APIPermission::kWindowShape, "app.window.shape"}, | 80 {APIPermission::kWindowShape, "app.window.shape"}, |
| 81 {APIPermission::kImeWindowEnabled, "app.window.ime"}, |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 std::vector<APIPermissionInfo*> permissions; | 84 std::vector<APIPermissionInfo*> permissions; |
| 84 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(permissions_to_register); ++i) | 85 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(permissions_to_register); ++i) |
| 85 permissions.push_back(new APIPermissionInfo(permissions_to_register[i])); | 86 permissions.push_back(new APIPermissionInfo(permissions_to_register[i])); |
| 86 return permissions; | 87 return permissions; |
| 87 } | 88 } |
| 88 | 89 |
| 89 std::vector<PermissionsProvider::AliasInfo> | 90 std::vector<PermissionsProvider::AliasInfo> |
| 90 ExtensionsAPIPermissions::GetAllAliases() const { | 91 ExtensionsAPIPermissions::GetAllAliases() const { |
| 91 std::vector<PermissionsProvider::AliasInfo> aliases; | 92 std::vector<PermissionsProvider::AliasInfo> aliases; |
| 92 aliases.push_back(PermissionsProvider::AliasInfo( | 93 aliases.push_back(PermissionsProvider::AliasInfo( |
| 93 "app.window.alwaysOnTop", kOldAlwaysOnTopWindowsPermission)); | 94 "app.window.alwaysOnTop", kOldAlwaysOnTopWindowsPermission)); |
| 94 aliases.push_back(PermissionsProvider::AliasInfo("app.window.fullscreen", | 95 aliases.push_back(PermissionsProvider::AliasInfo("app.window.fullscreen", |
| 95 kOldFullscreenPermission)); | 96 kOldFullscreenPermission)); |
| 96 aliases.push_back( | 97 aliases.push_back( |
| 97 PermissionsProvider::AliasInfo("app.window.fullscreen.overrideEsc", | 98 PermissionsProvider::AliasInfo("app.window.fullscreen.overrideEsc", |
| 98 kOldOverrideEscFullscreenPermission)); | 99 kOldOverrideEscFullscreenPermission)); |
| 99 return aliases; | 100 return aliases; |
| 100 } | 101 } |
| 101 | 102 |
| 102 } // namespace extensions | 103 } // namespace extensions |
| OLD | NEW |