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

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 10878040: Move context-sensitive app.window.* functions to app.window.current().* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 3 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/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 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 &host_permissions)) { 3127 &host_permissions)) {
3128 return false; 3128 return false;
3129 } 3129 }
3130 3130
3131 // TODO(jeremya/kalman) do this via the features system by exposing the 3131 // TODO(jeremya/kalman) do this via the features system by exposing the
3132 // app.window API to platform apps, with no dependency on any permissions. 3132 // app.window API to platform apps, with no dependency on any permissions.
3133 // See http://crbug.com/120069. 3133 // See http://crbug.com/120069.
3134 if (is_platform_app()) { 3134 if (is_platform_app()) {
3135 api_permissions.insert(APIPermission::kAppRuntime); 3135 api_permissions.insert(APIPermission::kAppRuntime);
3136 api_permissions.insert(APIPermission::kAppWindow); 3136 api_permissions.insert(APIPermission::kAppWindow);
3137 api_permissions.insert(APIPermission::kAppCurrentWindowInternal);
3137 } 3138 }
3138 3139
3139 APIPermissionSet optional_api_permissions; 3140 APIPermissionSet optional_api_permissions;
3140 URLPatternSet optional_host_permissions; 3141 URLPatternSet optional_host_permissions;
3141 if (!ParsePermissions(keys::kOptionalPermissions, 3142 if (!ParsePermissions(keys::kOptionalPermissions,
3142 error, 3143 error,
3143 &optional_api_permissions, 3144 &optional_api_permissions,
3144 &optional_host_permissions)) { 3145 &optional_host_permissions)) {
3145 return false; 3146 return false;
3146 } 3147 }
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
3926 3927
3927 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3928 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3928 const Extension* extension, 3929 const Extension* extension,
3929 const PermissionSet* permissions, 3930 const PermissionSet* permissions,
3930 Reason reason) 3931 Reason reason)
3931 : reason(reason), 3932 : reason(reason),
3932 extension(extension), 3933 extension(extension),
3933 permissions(permissions) {} 3934 permissions(permissions) {}
3934 3935
3935 } // namespace extensions 3936 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698