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

Unified Diff: chrome/browser/resources/google_now/background.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, 10 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/browser/resources/google_now/background.js
diff --git a/chrome/browser/resources/google_now/background.js b/chrome/browser/resources/google_now/background.js
index 0d354891ea85f71e0194d8ebca23f821d8a1f489..ef21a725fb632bec62a9ab33800fc06fd7c36a64 100644
--- a/chrome/browser/resources/google_now/background.js
+++ b/chrome/browser/resources/google_now/background.js
@@ -80,7 +80,7 @@ function createNotification(card, notificationsUrlInfo) {
// Create a notification or quietly update if it already exists.
// TODO(vadimt): Implement non-quiet updates.
- chrome.experimental.notification.create(
+ chrome.notification.create(
dharcourt 2013/03/04 23:46:27 "chrome.notification.*" should be "chrome.notifica
notificationId,
card,
function(assignedNotificationId) {});
@@ -125,7 +125,7 @@ function parseAndShowNotificationCards(response) {
// Delete notifications that didn't receive an update.
for (var notificationId in items.activeNotifications)
if (!items.activeNotifications[notificationId].hasUpdate) {
- chrome.experimental.notification.delete(
+ chrome.notification.delete(
notificationId,
function(wasDeleted) {});
}
@@ -236,7 +236,7 @@ function onNotificationClicked(notificationId, area) {
}
/**
- * Callback for chrome.experimental.notification.onClosed event.
+ * Callback for chrome.notification.onClosed event.
* @param {string} notificationId Unique identifier of the notification.
* @param {boolean} byUser Whether the notification was closed by the user.
*/
@@ -296,14 +296,14 @@ chrome.alarms.onAlarm.addListener(function(alarm) {
updateNotificationsCards();
});
-chrome.experimental.notification.onClicked.addListener(
+chrome.notification.onClicked.addListener(
function(notificationId) {
onNotificationClicked(notificationId, 'message');
});
-chrome.experimental.notification.onButtonClicked.addListener(
+chrome.notification.onButtonClicked.addListener(
function(notificationId, buttonIndex) {
onNotificationClicked(notificationId, 'button' + buttonIndex);
});
-chrome.experimental.notification.onClosed.addListener(onNotificationClosed);
+chrome.notification.onClosed.addListener(onNotificationClosed);

Powered by Google App Engine
This is Rietveld 408576698