| 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..b55fa7636bab95b422cce4c52d69dc97bbff7eb0 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,17 +61,13 @@ 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 = {};
|
| var nextCallbackId = 1;
|
|
|
| @@ -83,7 +79,10 @@ app.installState = function getInstallState(callback) {
|
| if (extensionId)
|
| app.installState = wrapForLogging(app.installState);
|
|
|
| -// These must match the names in InstallAppbinding() in
|
| +// This must match InstallAppbinding() in
|
| // chrome/renderer/extensions/dispatcher.cc.
|
| +//
|
| +// TODO(kalman): we can get rid of this when the bindings code can be run in
|
| +// all renderers - very soon!
|
| exports.chromeApp = app;
|
| -exports.chromeHiddenApp = chromeHiddenApp;
|
| +exports.onInstallStateResponse = onInstallStateResponse;
|
|
|