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

Side by Side Diff: extensions/common/permissions/extensions_api_permissions.cc

Issue 671163002: Add new extension API for VPN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an optional callback to methods in the idl Created 6 years, 1 month 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
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 {APIPermission::kU2fDevices, "u2fDevices", APIPermissionInfo::kFlagNone, 73 {APIPermission::kU2fDevices, "u2fDevices", APIPermissionInfo::kFlagNone,
74 IDS_EXTENSION_PROMPT_WARNING_U2F_DEVICES, 74 IDS_EXTENSION_PROMPT_WARNING_U2F_DEVICES,
75 PermissionMessage::kU2fDevices}, 75 PermissionMessage::kU2fDevices},
76 {APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone, 76 {APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone,
77 IDS_EXTENSION_PROMPT_WARNING_USB, PermissionMessage::kUsb}, 77 IDS_EXTENSION_PROMPT_WARNING_USB, PermissionMessage::kUsb},
78 {APIPermission::kUsbDevice, "usbDevices", APIPermissionInfo::kFlagNone, 0, 78 {APIPermission::kUsbDevice, "usbDevices", APIPermissionInfo::kFlagNone, 0,
79 PermissionMessage::kNone, &CreateAPIPermission<UsbDevicePermission>}, 79 PermissionMessage::kNone, &CreateAPIPermission<UsbDevicePermission>},
80 {APIPermission::kVideoCapture, "videoCapture", 80 {APIPermission::kVideoCapture, "videoCapture",
81 APIPermissionInfo::kFlagNone, IDS_EXTENSION_PROMPT_WARNING_VIDEO_CAPTURE, 81 APIPermissionInfo::kFlagNone, IDS_EXTENSION_PROMPT_WARNING_VIDEO_CAPTURE,
82 PermissionMessage::kVideoCapture}, 82 PermissionMessage::kVideoCapture},
83 {APIPermission::kVpnProvider, "vpnProvider",
84 APIPermissionInfo::kFlagCannotBeOptional,
85 IDS_EXTENSION_PROMPT_WARNING_VPN, PermissionMessage::kVpnProvider},
83 // NOTE(kalman): This is provided by a manifest property but needs to 86 // NOTE(kalman): This is provided by a manifest property but needs to
84 // appear in the install permission dialogue, so we need a fake 87 // appear in the install permission dialogue, so we need a fake
85 // permission for it. See http://crbug.com/247857. 88 // permission for it. See http://crbug.com/247857.
86 {APIPermission::kWebConnectable, "webConnectable", 89 {APIPermission::kWebConnectable, "webConnectable",
87 APIPermissionInfo::kFlagCannotBeOptional | 90 APIPermissionInfo::kFlagCannotBeOptional |
88 APIPermissionInfo::kFlagInternal, 91 APIPermissionInfo::kFlagInternal,
89 IDS_EXTENSION_PROMPT_WARNING_WEB_CONNECTABLE, 92 IDS_EXTENSION_PROMPT_WARNING_WEB_CONNECTABLE,
90 PermissionMessage::kWebConnectable}, 93 PermissionMessage::kWebConnectable},
91 {APIPermission::kWebRequest, "webRequest"}, 94 {APIPermission::kWebRequest, "webRequest"},
92 {APIPermission::kWebRequestBlocking, "webRequestBlocking"}, 95 {APIPermission::kWebRequestBlocking, "webRequestBlocking"},
(...skipping 15 matching lines...) Expand all
108 "app.window.alwaysOnTop", kOldAlwaysOnTopWindowsPermission)); 111 "app.window.alwaysOnTop", kOldAlwaysOnTopWindowsPermission));
109 aliases.push_back(PermissionsProvider::AliasInfo("app.window.fullscreen", 112 aliases.push_back(PermissionsProvider::AliasInfo("app.window.fullscreen",
110 kOldFullscreenPermission)); 113 kOldFullscreenPermission));
111 aliases.push_back( 114 aliases.push_back(
112 PermissionsProvider::AliasInfo("app.window.fullscreen.overrideEsc", 115 PermissionsProvider::AliasInfo("app.window.fullscreen.overrideEsc",
113 kOldOverrideEscFullscreenPermission)); 116 kOldOverrideEscFullscreenPermission));
114 return aliases; 117 return aliases;
115 } 118 }
116 119
117 } // namespace extensions 120 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/permissions/api_permission.h ('k') | extensions/common/permissions/permission_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698