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

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

Issue 503383002: Allow component IME extension use app.window and add 'ime' window type for app window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 // appear in the install permission dialogue, so we need a fake 73 // appear in the install permission dialogue, so we need a fake
74 // permission for it. See http://crbug.com/247857. 74 // permission for it. See http://crbug.com/247857.
75 {APIPermission::kWebConnectable, "webConnectable", 75 {APIPermission::kWebConnectable, "webConnectable",
76 APIPermissionInfo::kFlagCannotBeOptional | 76 APIPermissionInfo::kFlagCannotBeOptional |
77 APIPermissionInfo::kFlagInternal, 77 APIPermissionInfo::kFlagInternal,
78 IDS_EXTENSION_PROMPT_WARNING_WEB_CONNECTABLE, 78 IDS_EXTENSION_PROMPT_WARNING_WEB_CONNECTABLE,
79 PermissionMessage::kWebConnectable}, 79 PermissionMessage::kWebConnectable},
80 {APIPermission::kWebView, "webview", 80 {APIPermission::kWebView, "webview",
81 APIPermissionInfo::kFlagCannotBeOptional}, 81 APIPermissionInfo::kFlagCannotBeOptional},
82 {APIPermission::kWindowShape, "app.window.shape"}, 82 {APIPermission::kWindowShape, "app.window.shape"},
83 {APIPermission::kImeWindowEnabled, "app.window.ime"},
83 }; 84 };
84 85
85 std::vector<APIPermissionInfo*> permissions; 86 std::vector<APIPermissionInfo*> permissions;
86 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(permissions_to_register); ++i) 87 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(permissions_to_register); ++i)
87 permissions.push_back(new APIPermissionInfo(permissions_to_register[i])); 88 permissions.push_back(new APIPermissionInfo(permissions_to_register[i]));
88 return permissions; 89 return permissions;
89 } 90 }
90 91
91 std::vector<PermissionsProvider::AliasInfo> 92 std::vector<PermissionsProvider::AliasInfo>
92 ExtensionsAPIPermissions::GetAllAliases() const { 93 ExtensionsAPIPermissions::GetAllAliases() const {
93 std::vector<PermissionsProvider::AliasInfo> aliases; 94 std::vector<PermissionsProvider::AliasInfo> aliases;
94 aliases.push_back(PermissionsProvider::AliasInfo( 95 aliases.push_back(PermissionsProvider::AliasInfo(
95 "app.window.alwaysOnTop", kOldAlwaysOnTopWindowsPermission)); 96 "app.window.alwaysOnTop", kOldAlwaysOnTopWindowsPermission));
96 aliases.push_back(PermissionsProvider::AliasInfo("app.window.fullscreen", 97 aliases.push_back(PermissionsProvider::AliasInfo("app.window.fullscreen",
97 kOldFullscreenPermission)); 98 kOldFullscreenPermission));
98 aliases.push_back( 99 aliases.push_back(
99 PermissionsProvider::AliasInfo("app.window.fullscreen.overrideEsc", 100 PermissionsProvider::AliasInfo("app.window.fullscreen.overrideEsc",
100 kOldOverrideEscFullscreenPermission)); 101 kOldOverrideEscFullscreenPermission));
101 return aliases; 102 return aliases;
102 } 103 }
103 104
104 } // namespace extensions 105 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/permissions/api_permission.h ('k') | extensions/renderer/resources/app_window_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698