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

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: Fix merge conflicts. 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 0b9dd89b41df7b8d0edb9b402419f2e58c5140cf..c153ce0022ac4c90ea768581560c2c5ee4307160 100644
--- a/chrome/renderer/resources/extensions/app_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_custom_bindings.js
@@ -28,13 +28,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);
@@ -43,26 +36,10 @@ var chromeHiddenApp = {
}
};
-// appNotification stuff.
-//
-// TODO(kalman): move this stuff to its own custom binding.
-// 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?
+// TODO(kalman): move this stuff to its own custom bindings.
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;
@@ -74,6 +51,5 @@ app.installState = function getInstallState(callback) {
var availability = GetAvailability('app');
if (availability.is_available) {
exports.chromeApp = app;
- exports.chromeAppNotifications = appNotifications;
exports.chromeHiddenApp = chromeHiddenApp;
}
« no previous file with comments | « chrome/renderer/extensions/dispatcher.cc ('k') | chrome/test/data/extensions/api_test/app_notifications/launch.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698