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

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: Missed one pathname. 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 chrome.notifications API.
6 6
7 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 7 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
8 var sendRequest = require('sendRequest').sendRequest; 8 var sendRequest = require('sendRequest').sendRequest;
9 var imageUtil = require('imageUtil'); 9 var imageUtil = require('imageUtil');
10 var lastError = require('lastError'); 10 var lastError = require('lastError');
11 11
12 function url_getter(context, key) { 12 function url_getter(context, key) {
13 var f = function() { 13 var f = function() {
14 return this[key]; 14 return this[key];
15 }; 15 };
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 lastError.set('Unable to download all specified images.'); 112 lastError.set('Unable to download all specified images.');
113 failure_function(callback, id); 113 failure_function(callback, id);
114 }); 114 });
115 }; 115 };
116 } 116 }
117 117
118 var handleCreate = genHandle(function(callback, id) { callback(id); }); 118 var handleCreate = genHandle(function(callback, id) { callback(id); });
119 var handleUpdate = genHandle(function(callback, id) { callback(false); }); 119 var handleUpdate = genHandle(function(callback, id) { callback(false); });
120 120
121 var experimentalNotificationCustomHook = function(bindingsAPI, extensionId) { 121 var notificationsCustomHook = function(bindingsAPI, extensionId) {
122 var apiFunctions = bindingsAPI.apiFunctions; 122 var apiFunctions = bindingsAPI.apiFunctions;
123 apiFunctions.setHandleRequest('create', handleCreate); 123 apiFunctions.setHandleRequest('create', handleCreate);
124 apiFunctions.setHandleRequest('update', handleCreate); 124 apiFunctions.setHandleRequest('update', handleCreate);
125 }; 125 };
126 126
127 chromeHidden.registerCustomHook('experimental.notification', 127 chromeHidden.registerCustomHook('notifications', notificationsCustomHook);
128 experimentalNotificationCustomHook);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698