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

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: fix test compile Created 7 years, 6 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 5fc9c2bf5ab2e9a1efd4be54876f92055e7a9fc6..023f56d5c7a647330b6a3ce1ef6ed3eb0a60b290 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;
}
@@ -59,15 +59,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 (typeof(callback) == 'function')
+ callback(state);
+}
// TODO(kalman): move this stuff to its own custom bindings.
var callbacks = {};
@@ -81,7 +78,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;
« no previous file with comments | « chrome/renderer/extensions/webstore_bindings.cc ('k') | chrome/renderer/resources/extensions/app_window_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698