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

Unified Diff: chrome/renderer/resources/extensions/app_custom_bindings.js

Issue 15855010: Make ExtensionMsg_MessageInvoke run a module system function rather than a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: go Created 7 years, 7 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/app_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/app_custom_bindings.js b/chrome/renderer/resources/extensions/app_custom_bindings.js
index 0c2011d18737f436a103952dbd48182d2fce42a1..93f21fbf68728ddfe7ed7cebb60991a3fd28f042 100644
--- a/chrome/renderer/resources/extensions/app_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_custom_bindings.js
@@ -7,7 +7,7 @@
var GetAvailability = requireNative('v8_context').GetAvailability;
if (!GetAvailability('app').is_available) {
exports.chromeApp = {};
- exports.chromeHiddenApp = {};
+ exports.onInstallStateResponse = function(){};
return;
}
@@ -61,15 +61,12 @@ else
wrapForLogging(appNatives.GetIsInstalled));
// Called by app_bindings.cc.
-// This becomes chromeHidden.app
-var chromeHiddenApp = {
- onInstallStateResponse: function(state, callbackId) {
- if (callbackId) {
- callbacks[callbackId](state);
- delete callbacks[callbackId];
- }
- }
-};
+function onInstallStateResponse(state, callbackId) {
+ var callback = callbacks[callbackId];
+ delete callbacks[callbackId];
+ if (callback)
+ callback(state);
+}
// TODO(kalman): move this stuff to its own custom bindings.
var callbacks = {};
@@ -83,7 +80,7 @@ app.installState = function getInstallState(callback) {
if (extensionId)
app.installState = wrapForLogging(app.installState);
-// These must match the names in InstallAppbinding() in
+// This must match InstallAppBindings() in
// chrome/renderer/extensions/dispatcher.cc.
exports.chromeApp = app;
-exports.chromeHiddenApp = chromeHiddenApp;
+exports.onInstallStateResponse = onInstallStateResponse;

Powered by Google App Engine
This is Rietveld 408576698