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

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

Issue 12680004: Remove chrome/ code to handle App Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert sync pref changes Created 7 years, 9 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 1a8bbcc7d6dab3ecaf05cee5574a61aed13e9ca4..4d28b3db7e2fca3c08b50168ed3c227fc4a6e18c 100644
--- a/chrome/renderer/resources/extensions/app_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_custom_bindings.js
@@ -26,13 +26,6 @@ app.__defineGetter__('isInstalled', appNatives.GetIsInstalled);
// Called by app_bindings.cc.
// This becomes chromeHidden.app
var chromeHiddenApp = {
- onGetAppNotifyChannelResponse: function(channelId, error, callbackId) {
- if (callbackId) {
- callbacks[callbackId](channelId, error);
- delete callbacks[callbackId];
- }
- },
-
onInstallStateResponse: function(state, callbackId) {
if (callbackId) {
callbacks[callbackId](state);
@@ -41,26 +34,10 @@ var chromeHiddenApp = {
}
};
-// appNotification stuff.
-//
// TODO(kalman): move this stuff to its own custom bindings.
-// It will be bit tricky since I'll need to look into why there are
-// permissions defined for app notifications, yet this always sets it up?
var callbacks = {};
var nextCallbackId = 1;
-// This becomes chrome.appNotifications.
-var appNotifications = {
- getChannel: function getChannel(clientId, callback) {
- var callbackId = 0;
- if (callback) {
- callbackId = nextCallbackId++;
- callbacks[callbackId] = callback;
- }
- appNatives.GetAppNotifyChannel(clientId, callbackId);
- }
-};
-
app.installState = function getInstallState(callback) {
var callbackId = nextCallbackId++;
callbacks[callbackId] = callback;
@@ -70,5 +47,4 @@ app.installState = function getInstallState(callback) {
// These must match the names in InstallAppBindings() in
// chrome/renderer/extensions/dispatcher.cc.
exports.chromeApp = app;
-exports.chromeAppNotifications = appNotifications;
exports.chromeHiddenApp = chromeHiddenApp;

Powered by Google App Engine
This is Rietveld 408576698