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

Unified Diff: chrome/renderer/resources/extensions/miscellaneous_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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/miscellaneous_bindings.js
diff --git a/chrome/renderer/resources/extensions/miscellaneous_bindings.js b/chrome/renderer/resources/extensions/miscellaneous_bindings.js
index 37ce11dd6d7ba45885b4b3d1a5f582868f9a3368..c436e9217d459982a00b0a02fa4660b53ec88fd5 100644
--- a/chrome/renderer/resources/extensions/miscellaneous_bindings.js
+++ b/chrome/renderer/resources/extensions/miscellaneous_bindings.js
@@ -8,16 +8,14 @@
// See user_script_slave.cc for script that is loaded by content scripts only.
// TODO(mpcomplete): we also load this in regular web pages, but don't need to.
-var chrome = chrome || {};
-(function () {
- native function OpenChannelToExtension(sourceId, targetId, name);
- native function CloseChannel(portId, notifyBrowser);
- native function PortAddRef(portId);
- native function PortRelease(portId);
- native function PostMessage(portId, msg);
- native function GetChromeHidden();
- native function GetL10nMessage();
- native function Print();
+ var OpenChannelToExtension = natives.OpenChannelToExtension;
+ var CloseChannel = natives.CloseChannel;
+ var PortAddRef = natives.PortAddRef;
+ var PortRelease = natives.PortRelease;
+ var PostMessage = natives.PostMessage;
+ var GetChromeHidden = natives.GetChromeHidden;
+ var GetL10nMessage = natives.GetL10nMessage;
+ var Print = natives.Print;
var chromeHidden = GetChromeHidden();
var manifestVersion;
@@ -289,5 +287,3 @@ var chrome = chrome || {};
return GetL10nMessage(message_name, placeholders, extensionId);
};
});
-
-})();

Powered by Google App Engine
This is Rietveld 408576698