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

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

Issue 9386001: Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 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 var chrome = chrome || {}; 8 var GetChromeHidden = natives.GetChromeHidden;
9 (function() { 9 var GetExtensionAPIDefinition = natives.GetExtensionAPIDefinition;
10 native function GetChromeHidden(); 10 var GetNextRequestId = natives.GetNextRequestId;
11 native function GetExtensionAPIDefinition(); 11 var StartRequest = natives.StartRequest;
12 native function GetNextRequestId(); 12 var SetIconCommon = natives.SetIconCommon;
13 native function StartRequest();
14 native function SetIconCommon();
15 13
16 var chromeHidden = GetChromeHidden(); 14 var chromeHidden = GetChromeHidden();
17 15
18 if (!chrome) 16 if (!chrome)
19 chrome = {}; 17 chrome = {};
20 18
21 function apiExists(path) { 19 function apiExists(path) {
22 var resolved = chrome; 20 var resolved = chrome;
23 path.split(".").forEach(function(next) { 21 path.split(".").forEach(function(next) {
24 if (resolved) 22 if (resolved)
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 // beginInstallWithManifest2. 571 // beginInstallWithManifest2.
574 // See http://crbug.com/100242 572 // See http://crbug.com/100242
575 if (apiExists("webstorePrivate")) { 573 if (apiExists("webstorePrivate")) {
576 chrome.webstorePrivate.beginInstallWithManifest2 = 574 chrome.webstorePrivate.beginInstallWithManifest2 =
577 chrome.webstorePrivate.beginInstallWithManifest3; 575 chrome.webstorePrivate.beginInstallWithManifest3;
578 } 576 }
579 577
580 if (apiExists("test")) 578 if (apiExists("test"))
581 chrome.test.getApiDefinitions = GetExtensionAPIDefinition; 579 chrome.test.getApiDefinitions = GetExtensionAPIDefinition;
582 }); 580 });
583 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698