| 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 // Set up the global chrome object. | 5 // Set up the global chrome object. |
| 6 chrome = {}; | 6 chrome = {}; |
| 7 | 7 |
| 8 var contextInfo = requireNative('context_info'); | 8 var contextInfo = requireNative('context_info'); |
| 9 var sgb = requireNative('schema_generated_bindings'); | 9 var sgb = requireNative('schema_generated_bindings'); |
| 10 | 10 |
| 11 require('app'); | |
| 12 require('webstore'); | 11 require('webstore'); |
| 12 require('json_schema'); |
| 13 require('event_bindings'); |
| 14 require('miscellaneous_bindings'); |
| 15 require('schema_generated_bindings'); |
| 16 require('apitest'); |
| 13 | 17 |
| 14 if (contextInfo.IsBindingsAllowed()) { | 18 // Load the custom bindings for each API. |
| 15 require('json_schema'); | 19 sgb.GetExtensionAPIDefinition().forEach(function(apiDef) { |
| 16 require('event_bindings'); | 20 if (contextInfo.IsAPIAllowed(apiDef.namespace)) |
| 17 require('miscellaneous_bindings'); | 21 require(apiDef.namespace); |
| 18 require('schema_generated_bindings'); | 22 }); |
| 19 require('apitest'); | |
| 20 | |
| 21 // Load the custom bindings for each API. | |
| 22 sgb.GetExtensionAPIDefinition().forEach(function(apiDef) { | |
| 23 if (contextInfo.IsAPIAllowed(apiDef.namespace)) | |
| 24 require(apiDef.namespace); | |
| 25 }); | |
| 26 } | |
| OLD | NEW |