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

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: fix interactive_ui_tests Created 7 years, 10 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 json = require('json'); 11 var json = require('json');
13 var lastError = require('lastError'); 12 var lastError = require('lastError');
14 var miscNatives = requireNative('miscellaneous_bindings'); 13 var miscNatives = requireNative('miscellaneous_bindings');
14 var chrome = requireNative('chrome').GetChrome();
15 var CloseChannel = miscNatives.CloseChannel; 15 var CloseChannel = miscNatives.CloseChannel;
16 var PortAddRef = miscNatives.PortAddRef; 16 var PortAddRef = miscNatives.PortAddRef;
17 var PortRelease = miscNatives.PortRelease; 17 var PortRelease = miscNatives.PortRelease;
18 var PostMessage = miscNatives.PostMessage; 18 var PostMessage = miscNatives.PostMessage;
19 var BindToGC = miscNatives.BindToGC; 19 var BindToGC = miscNatives.BindToGC;
20 20
21 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 21 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
22 22
23 var processNatives = requireNative('process'); 23 var processNatives = requireNative('process');
24 var manifestVersion = processNatives.GetManifestVersion(); 24 var manifestVersion = processNatives.GetManifestVersion();
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 var targetId = null; 314 var targetId = null;
315 if (lastArg >= 0) 315 if (lastArg >= 0)
316 targetId = args[lastArg--]; 316 targetId = args[lastArg--];
317 317
318 if (lastArg != -1) 318 if (lastArg != -1)
319 throw new Error('Invalid arguments to ' + functionName + '.'); 319 throw new Error('Invalid arguments to ' + functionName + '.');
320 return [targetId, request, responseCallback]; 320 return [targetId, request, responseCallback];
321 } 321 }
322 322
323 exports.sendMessageUpdateArguments = sendMessageUpdateArguments; 323 exports.sendMessageUpdateArguments = sendMessageUpdateArguments;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698