Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/renderer/resources/extensions/schema_generated_bindings.js

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698