Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/common/extensions/permissions/api_permission.cc

Issue 10659021: Move chrome.appWindow to chrome.app.window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 { kDevtools, "devtools", 148 { kDevtools, "devtools",
149 kFlagImpliesFullURLAccess | kFlagCannotBeOptional }, 149 kFlagImpliesFullURLAccess | kFlagCannotBeOptional },
150 { kPlugin, "plugin", 150 { kPlugin, "plugin",
151 kFlagImpliesFullURLAccess | kFlagImpliesFullAccess | 151 kFlagImpliesFullURLAccess | kFlagImpliesFullAccess |
152 kFlagCannotBeOptional, 152 kFlagCannotBeOptional,
153 IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS, 153 IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS,
154 PermissionMessage::kFullAccess }, 154 PermissionMessage::kFullAccess },
155 155
156 // Platform-app permissions. 156 // Platform-app permissions.
157 { kSocket, "socket", kFlagCannotBeOptional }, 157 { kSocket, "socket", kFlagCannotBeOptional },
158 { kAppWindow, "appWindow" }, 158 { kAppWindow, "app.window" },
159 { kAudioCapture, "audioCapture", kFlagNone, 159 { kAudioCapture, "audioCapture", kFlagNone,
160 IDS_EXTENSION_PROMPT_WARNING_AUDIO_CAPTURE, 160 IDS_EXTENSION_PROMPT_WARNING_AUDIO_CAPTURE,
161 PermissionMessage::kAudioCapture }, 161 PermissionMessage::kAudioCapture },
162 { kVideoCapture, "videoCapture", kFlagNone, 162 { kVideoCapture, "videoCapture", kFlagNone,
163 IDS_EXTENSION_PROMPT_WARNING_VIDEO_CAPTURE, 163 IDS_EXTENSION_PROMPT_WARNING_VIDEO_CAPTURE,
164 PermissionMessage::kVideoCapture }, 164 PermissionMessage::kVideoCapture },
165 { kFileSystem, "fileSystem" }, 165 { kFileSystem, "fileSystem" },
166 { kFileSystemWrite, "fileSystemWrite", kFlagNone, 166 { kFileSystemWrite, "fileSystemWrite", kFlagNone,
167 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE, 167 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE,
168 PermissionMessage::kFileSystemWrite }, 168 PermissionMessage::kFileSystemWrite },
169 }; 169 };
170 170
171 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { 171 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) {
172 const PermissionRegistration& pr = PermissionsToRegister[i]; 172 const PermissionRegistration& pr = PermissionsToRegister[i];
173 info->RegisterPermission( 173 info->RegisterPermission(
174 pr.id, pr.name, pr.l10n_message_id, 174 pr.id, pr.name, pr.l10n_message_id,
175 pr.message_id ? pr.message_id : PermissionMessage::kNone, 175 pr.message_id ? pr.message_id : PermissionMessage::kNone,
176 pr.flags); 176 pr.flags);
177 } 177 }
178 178
179 // Register aliases. 179 // Register aliases.
180 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); 180 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission);
181 info->RegisterAlias("tabs", kWindowsPermission); 181 info->RegisterAlias("tabs", kWindowsPermission);
182 // TODO(mihaip): Should be removed for the M20 branch, see 182 // TODO(mihaip): Should be removed for the M20 branch, see
183 // http://crbug.com/120447 for more details. 183 // http://crbug.com/120447 for more details.
184 info->RegisterAlias("background", kTemporaryBackgroundAlias); 184 info->RegisterAlias("background", kTemporaryBackgroundAlias);
185 } 185 }
186 186
187 } // namespace extensions 187 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/renderer/extensions/app_window_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698