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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments/TODOs Created 7 years, 11 months 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 contains unprivileged javascript APIs for extensions and apps. It 5 // This contains unprivileged javascript APIs for extensions and apps. It
6 // can be loaded by any extension-related context, such as content scripts or 6 // can be loaded by any extension-related context, such as content scripts or
7 // background pages. See user_script_slave.cc for script that is loaded by 7 // background pages. See user_script_slave.cc for script that is loaded by
8 // content scripts only. 8 // content scripts only.
9 9
10 require('json_schema'); 10 require('json_schema');
11 require('event_bindings');
12 var lastError = require('lastError'); 11 var lastError = require('lastError');
13 var miscNatives = requireNative('miscellaneous_bindings'); 12 var miscNatives = requireNative('miscellaneous_bindings');
13 var chrome = requireNative('chrome').GetChrome();
14 var CloseChannel = miscNatives.CloseChannel; 14 var CloseChannel = miscNatives.CloseChannel;
15 var PortAddRef = miscNatives.PortAddRef; 15 var PortAddRef = miscNatives.PortAddRef;
16 var PortRelease = miscNatives.PortRelease; 16 var PortRelease = miscNatives.PortRelease;
17 var PostMessage = miscNatives.PostMessage; 17 var PostMessage = miscNatives.PostMessage;
18 var BindToGC = miscNatives.BindToGC; 18 var BindToGC = miscNatives.BindToGC;
19 19
20 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 20 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
21 21
22 var processNatives = requireNative('process'); 22 var processNatives = requireNative('process');
23 var manifestVersion = processNatives.GetManifestVersion(); 23 var manifestVersion = processNatives.GetManifestVersion();
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 var targetId = null; 313 var targetId = null;
314 if (lastArg >= 0) 314 if (lastArg >= 0)
315 targetId = args[lastArg--]; 315 targetId = args[lastArg--];
316 316
317 if (lastArg != -1) 317 if (lastArg != -1)
318 throw new Error('Invalid arguments to ' + functionName + '.'); 318 throw new Error('Invalid arguments to ' + functionName + '.');
319 return [targetId, request, responseCallback]; 319 return [targetId, request, responseCallback];
320 } 320 }
321 321
322 exports.sendMessageUpdateArguments = sendMessageUpdateArguments; 322 exports.sendMessageUpdateArguments = sendMessageUpdateArguments;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698