OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 to. | 9 // TODO(mpcomplete): we also load this in regular web pages, but don't need to. |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 // developers trying to call extension API's that aren't allowed to be | 287 // developers trying to call extension API's that aren't allowed to be |
288 // called from content scripts. | 288 // called from content scripts. |
289 function setupApiStubs() { | 289 function setupApiStubs() { |
290 // TODO(asargent) It would be nice to eventually generate this | 290 // TODO(asargent) It would be nice to eventually generate this |
291 // programmatically from extension_api.json (there is already a browser test | 291 // programmatically from extension_api.json (there is already a browser test |
292 // that should prevent it from getting stale). | 292 // that should prevent it from getting stale). |
293 var privileged = [ | 293 var privileged = [ |
294 // Entire namespaces. | 294 // Entire namespaces. |
295 "bookmarks", | 295 "bookmarks", |
296 "browserAction", | 296 "browserAction", |
| 297 "chromeAuthPrivate", |
297 "chromePrivate", | 298 "chromePrivate", |
298 "chromeosInfoPrivate", | 299 "chromeosInfoPrivate", |
299 "contextMenus", | 300 "contextMenus", |
300 "cookies", | 301 "cookies", |
301 "devtools", | 302 "devtools", |
302 "experimental.accessibility", | 303 "experimental.accessibility", |
303 "experimental.bookmarkManager", | 304 "experimental.bookmarkManager", |
304 "experimental.contentSettings", | 305 "experimental.contentSettings", |
305 "experimental.debugger", | 306 "experimental.debugger", |
306 "experimental.extension", | 307 "experimental.extension", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 "extension.onRequestExternal", | 346 "extension.onRequestExternal", |
346 "extension.setUpdateUrlData", | 347 "extension.setUpdateUrlData", |
347 "i18n.getAcceptLanguages" | 348 "i18n.getAcceptLanguages" |
348 ]; | 349 ]; |
349 for (var i = 0; i < privileged.length; i++) { | 350 for (var i = 0; i < privileged.length; i++) { |
350 createStub(privileged[i]); | 351 createStub(privileged[i]); |
351 } | 352 } |
352 } | 353 } |
353 | 354 |
354 })(); | 355 })(); |
OLD | NEW |