OLD | NEW |
1 // Copyright (c) 2009 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 | 9 // TODO(mpcomplete): we also load this in regular web pages, but don't need to. |
10 // to. | |
11 | 10 |
12 var chrome = chrome || {}; | 11 var chrome = chrome || {}; |
13 (function () { | 12 (function () { |
14 native function OpenChannelToExtension(sourceId, targetId, name); | 13 native function OpenChannelToExtension(sourceId, targetId, name); |
15 native function CloseChannel(portId, notifyBrowser); | 14 native function CloseChannel(portId, notifyBrowser); |
16 native function PortAddRef(portId); | 15 native function PortAddRef(portId); |
17 native function PortRelease(portId); | 16 native function PortRelease(portId); |
18 native function PostMessage(portId, msg); | 17 native function PostMessage(portId, msg); |
19 native function GetChromeHidden(); | 18 native function GetChromeHidden(); |
20 native function GetL10nMessage(); | 19 native function GetL10nMessage(); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 "fileBrowserPrivate", | 320 "fileBrowserPrivate", |
322 "fileSystem", | 321 "fileSystem", |
323 "management", | 322 "management", |
324 "omnibox", | 323 "omnibox", |
325 "pageAction", | 324 "pageAction", |
326 "pageActions", | 325 "pageActions", |
327 "tabs", | 326 "tabs", |
328 "test", | 327 "test", |
329 "toolstrip", | 328 "toolstrip", |
330 "webstorePrivate", | 329 "webstorePrivate", |
| 330 "webproxyPrivate", |
331 "windows", | 331 "windows", |
332 | 332 |
333 // Functions/events/properties within the extension namespace. | 333 // Functions/events/properties within the extension namespace. |
334 "extension.getBackgroundPage", | 334 "extension.getBackgroundPage", |
335 "extension.getExtensionTabs", | 335 "extension.getExtensionTabs", |
336 "extension.getToolstrips", | 336 "extension.getToolstrips", |
337 "extension.getViews", | 337 "extension.getViews", |
338 "extension.isAllowedIncognitoAccess", | 338 "extension.isAllowedIncognitoAccess", |
339 "extension.isAllowedFileSchemeAccess", | 339 "extension.isAllowedFileSchemeAccess", |
340 "extension.onConnectExternal", | 340 "extension.onConnectExternal", |
341 "extension.onRequestExternal", | 341 "extension.onRequestExternal", |
342 "extension.setUpdateUrlData", | 342 "extension.setUpdateUrlData", |
343 "i18n.getAcceptLanguages" | 343 "i18n.getAcceptLanguages" |
344 ]; | 344 ]; |
345 for (var i = 0; i < privileged.length; i++) { | 345 for (var i = 0; i < privileged.length; i++) { |
346 createStub(privileged[i]); | 346 createStub(privileged[i]); |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
350 })(); | 350 })(); |
OLD | NEW |