Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // This script contains privileged chrome extension related javascript APIs. | 5 // This script contains privileged chrome extension related javascript APIs. |
| 6 // It is loaded by pages whose URL has the chrome-extension protocol. | 6 // It is loaded by pages whose URL has the chrome-extension protocol. |
| 7 | 7 |
| 8 // TODO(cduvall): MASSIVE REFACTOR | |
|
not at google - send to devlin
2012/12/13 22:26:40
nice
| |
| 9 exports.compile = function(json) { | |
| 10 return json; | |
| 11 } | |
| 12 | |
| 8 // TODO(battre): cleanup the usage of packages everywhere, as described here | 13 // TODO(battre): cleanup the usage of packages everywhere, as described here |
| 9 // http://codereview.chromium.org/10392008/diff/38/chrome/renderer/resources/e xtensions/schema_generated_bindings.js | 14 // http://codereview.chromium.org/10392008/diff/38/chrome/renderer/resources/e xtensions/schema_generated_bindings.js |
| 10 | 15 |
| 11 require('json_schema'); | 16 require('json_schema'); |
| 12 require('event_bindings'); | 17 require('event_bindings'); |
| 13 var GetExtensionAPIDefinition = | 18 var GetExtensionAPIDefinition = |
| 14 requireNative('apiDefinitions').GetExtensionAPIDefinition; | 19 requireNative('apiDefinitions').GetExtensionAPIDefinition; |
| 15 var sendRequest = require('sendRequest').sendRequest; | 20 var sendRequest = require('sendRequest').sendRequest; |
| 16 var utils = require('utils'); | 21 var utils = require('utils'); |
| 17 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); | 22 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 433 hook({ | 438 hook({ |
| 434 apiFunctions: new NamespacedAPIFunctions(apiDef.namespace, | 439 apiFunctions: new NamespacedAPIFunctions(apiDef.namespace, |
| 435 apiFunctions), | 440 apiFunctions), |
| 436 apiDefinitions: apiDefinitions, | 441 apiDefinitions: apiDefinitions, |
| 437 }, extensionId, contextType); | 442 }, extensionId, contextType); |
| 438 }); | 443 }); |
| 439 | 444 |
| 440 if (chrome.test) | 445 if (chrome.test) |
| 441 chrome.test.getApiDefinitions = GetExtensionAPIDefinition; | 446 chrome.test.getApiDefinitions = GetExtensionAPIDefinition; |
| 442 }); | 447 }); |
| OLD | NEW |