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

Side by Side Diff: chrome/renderer/resources/extensions/notifications_custom_bindings.js

Issue 12313115: Take notification API out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Custom bindings for the notification API. 5 // Custom bindings for the notifications API.
6 6
7 var binding = require('binding').Binding.create('experimental.notification'); 7 var binding = require('binding').Binding.create('notifications');
8 8
9 var sendRequest = require('sendRequest').sendRequest; 9 var sendRequest = require('sendRequest').sendRequest;
10 var imageUtil = require('imageUtil'); 10 var imageUtil = require('imageUtil');
11 var lastError = require('lastError'); 11 var lastError = require('lastError');
12 var json = require('json'); 12 var json = require('json');
13 13
14 function url_getter(context, key) { 14 function url_getter(context, key) {
15 var f = function() { 15 var f = function() {
16 return this[key]; 16 return this[key];
17 }; 17 };
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // don't know where that is. 116 // don't know where that is.
117 lastError.run('Unable to download all specified images.', 117 lastError.run('Unable to download all specified images.',
118 failure_function, [callback, id]); 118 failure_function, [callback, id]);
119 }); 119 });
120 }; 120 };
121 } 121 }
122 122
123 var handleCreate = genHandle(function(callback, id) { callback(id); }); 123 var handleCreate = genHandle(function(callback, id) { callback(id); });
124 var handleUpdate = genHandle(function(callback, id) { callback(false); }); 124 var handleUpdate = genHandle(function(callback, id) { callback(false); });
125 125
126 var experimentalNotificationCustomHook = function(bindingsAPI, extensionId) { 126 var notificationsCustomHook = function(bindingsAPI, extensionId) {
127 var apiFunctions = bindingsAPI.apiFunctions; 127 var apiFunctions = bindingsAPI.apiFunctions;
128 apiFunctions.setHandleRequest('create', handleCreate); 128 apiFunctions.setHandleRequest('create', handleCreate);
129 apiFunctions.setHandleRequest('update', handleCreate); 129 apiFunctions.setHandleRequest('update', handleCreate);
130 }; 130 };
131 131
132 binding.registerCustomHook(experimentalNotificationCustomHook); 132 binding.registerCustomHook(notificationsCustomHook);
133 133
134 exports.binding = binding.generate(); 134 exports.binding = binding.generate();
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/notification_custom_bindings.js ('k') | chrome/renderer/resources/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698