OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // This script contains unprivileged javascript APIs related to chrome | 5 // This script contains unprivileged javascript APIs related to chrome |
6 // extensions. It is loaded by any extension-related context, such as content | 6 // extensions. It is loaded by any extension-related context, such as content |
7 // scripts or toolstrips. | 7 // scripts or toolstrips. |
8 // See user_script_slave.cc for script that is loaded by content scripts only. | 8 // See user_script_slave.cc for script that is loaded by content scripts only. |
9 // TODO(mpcomplete): we also load this in regular web pages, but don't need | 9 // TODO(mpcomplete): we also load this in regular web pages, but don't need |
10 // to. | 10 // to. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // TODO(asargent) It would be nice to eventually generate this | 239 // TODO(asargent) It would be nice to eventually generate this |
240 // programmatically from extension_api.json (there is already a browser test | 240 // programmatically from extension_api.json (there is already a browser test |
241 // that should prevent it from getting stale). | 241 // that should prevent it from getting stale). |
242 var privileged = [ | 242 var privileged = [ |
243 // Entire namespaces. | 243 // Entire namespaces. |
244 "bookmarks", | 244 "bookmarks", |
245 "browserAction", | 245 "browserAction", |
246 "devtools", | 246 "devtools", |
247 "experimental.accessibility", | 247 "experimental.accessibility", |
248 "experimental.bookmarkManager", | 248 "experimental.bookmarkManager", |
| 249 "experimental.clipboard", |
249 "experimental.extension", | 250 "experimental.extension", |
250 "experimental.idle", | 251 "experimental.idle", |
251 "experimental.history", | 252 "experimental.history", |
252 "experimental.metrics", | 253 "experimental.metrics", |
253 "experimental.popup", | 254 "experimental.popup", |
254 "experimental.processes", | 255 "experimental.processes", |
255 "pageAction", | 256 "pageAction", |
256 "pageActions", | 257 "pageActions", |
257 "tabs", | 258 "tabs", |
258 "test", | 259 "test", |
259 "toolstrip", | 260 "toolstrip", |
260 "windows", | 261 "windows", |
261 | 262 |
262 // Functions/events/properties within the extension namespace. | 263 // Functions/events/properties within the extension namespace. |
263 "extension.getBackgroundPage", | 264 "extension.getBackgroundPage", |
264 "extension.getExtensionTabs", | 265 "extension.getExtensionTabs", |
265 "extension.getToolstrips", | 266 "extension.getToolstrips", |
266 "extension.getViews", | 267 "extension.getViews", |
267 "extension.lastError", | 268 "extension.lastError", |
268 "extension.onConnectExternal", | 269 "extension.onConnectExternal", |
269 "extension.onRequestExternal", | 270 "extension.onRequestExternal", |
270 "i18n.getAcceptLanguages" | 271 "i18n.getAcceptLanguages" |
271 ]; | 272 ]; |
272 for (var i = 0; i < privileged.length; i++) { | 273 for (var i = 0; i < privileged.length; i++) { |
273 createStub(privileged[i]); | 274 createStub(privileged[i]); |
274 } | 275 } |
275 } | 276 } |
276 | 277 |
277 })(); | 278 })(); |
OLD | NEW |