Chromium Code Reviews| 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 9cae9d4c2777764d1d39e82a77593c61f1276092..2f86093cd4d59d1bd42b81e7920f550f72dbe910 100644 |
| --- a/chrome/renderer/resources/extensions/app_custom_bindings.js |
| +++ b/chrome/renderer/resources/extensions/app_custom_bindings.js |
| @@ -5,9 +5,9 @@ |
| // Custom bindings for the app API. |
| var appNatives = requireNative('app'); |
| -var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); |
| -chrome.app = { |
| +// This becomes chrome.app |
| +var app = { |
| getIsInstalled: appNatives.GetIsInstalled, |
| install: appNatives.Install, |
| getDetails: appNatives.GetDetails, |
| @@ -20,10 +20,11 @@ chrome.app = { |
| // |
| // So, define it manually, and let the getIsInstalled function act as its |
| // documentation. |
| -chrome.app.__defineGetter__('isInstalled', appNatives.GetIsInstalled); |
| +app.__defineGetter__('isInstalled', appNatives.GetIsInstalled); |
| // Called by app_bindings.cc. |
| -chromeHidden.app = { |
| +// This becomes chromeHidden.app |
| +var chromeHiddenApp = { |
| onGetAppNotifyChannelResponse: function(channelId, error, callbackId) { |
| if (callbackId) { |
| callbacks[callbackId](channelId, error); |
| @@ -40,7 +41,8 @@ chromeHidden.app = { |
| var callbacks = {}; |
| var nextCallbackId = 1; |
| -chrome.appNotifications = { |
| +// This becomes chrome.appNotifications. |
| +var appNotifications = { |
| getChannel: function getChannel(clientId, callback) { |
| var callbackId = 0; |
| if (callback) { |
| @@ -50,3 +52,7 @@ chrome.appNotifications = { |
| appNatives.GetAppNotifyChannel(clientId, callbackId); |
| } |
| }; |
| + |
| +exports.chromeApp = app; |
|
not at google - send to devlin
2012/03/25 22:42:58
could you add like "must match the names in extens
koz (OOO until 15th September)
2012/03/26 01:36:09
Done.
|
| +exports.chromeAppNotifications = appNotifications; |
| +exports.chromeHiddenApp = chromeHiddenApp; |