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/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 3112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3123 if (!ParsePermissions(keys::kPermissions, | 3123 if (!ParsePermissions(keys::kPermissions, |
3124 error, | 3124 error, |
3125 &api_permissions, | 3125 &api_permissions, |
3126 &host_permissions)) { | 3126 &host_permissions)) { |
3127 return false; | 3127 return false; |
3128 } | 3128 } |
3129 | 3129 |
3130 // TODO(jeremya/kalman) do this via the features system by exposing the | 3130 // TODO(jeremya/kalman) do this via the features system by exposing the |
3131 // app.window API to platform apps, with no dependency on any permissions. | 3131 // app.window API to platform apps, with no dependency on any permissions. |
3132 // See http://crbug.com/120069. | 3132 // See http://crbug.com/120069. |
3133 if (is_platform_app()) | 3133 if (is_platform_app()) { |
| 3134 api_permissions.insert(APIPermission::kAppRuntime); |
3134 api_permissions.insert(APIPermission::kAppWindow); | 3135 api_permissions.insert(APIPermission::kAppWindow); |
| 3136 } |
3135 | 3137 |
3136 APIPermissionSet optional_api_permissions; | 3138 APIPermissionSet optional_api_permissions; |
3137 URLPatternSet optional_host_permissions; | 3139 URLPatternSet optional_host_permissions; |
3138 if (!ParsePermissions(keys::kOptionalPermissions, | 3140 if (!ParsePermissions(keys::kOptionalPermissions, |
3139 error, | 3141 error, |
3140 &optional_api_permissions, | 3142 &optional_api_permissions, |
3141 &optional_host_permissions)) { | 3143 &optional_host_permissions)) { |
3142 return false; | 3144 return false; |
3143 } | 3145 } |
3144 | 3146 |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3901 | 3903 |
3902 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3904 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3903 const Extension* extension, | 3905 const Extension* extension, |
3904 const PermissionSet* permissions, | 3906 const PermissionSet* permissions, |
3905 Reason reason) | 3907 Reason reason) |
3906 : reason(reason), | 3908 : reason(reason), |
3907 extension(extension), | 3909 extension(extension), |
3908 permissions(permissions) {} | 3910 permissions(permissions) {} |
3909 | 3911 |
3910 } // namespace extensions | 3912 } // namespace extensions |
OLD | NEW |