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

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: 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 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..2cb3391094cb8731e434ce07bddd2a0345ede771 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.notifications.create(
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.notifications.delete(
notificationId,
function(wasDeleted) {});
}
@@ -236,7 +236,7 @@ function onNotificationClicked(notificationId, area) {
}
/**
- * Callback for chrome.experimental.notification.onClosed event.
+ * Callback for chrome.notifications.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.notifications.onClicked.addListener(
function(notificationId) {
onNotificationClicked(notificationId, 'message');
});
-chrome.experimental.notification.onButtonClicked.addListener(
+chrome.notifications.onButtonClicked.addListener(
function(notificationId, buttonIndex) {
onNotificationClicked(notificationId, 'button' + buttonIndex);
});
-chrome.experimental.notification.onClosed.addListener(onNotificationClosed);
+chrome.notifications.onClosed.addListener(onNotificationClosed);
« no previous file with comments | « chrome/browser/notifications/message_center_settings_controller.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698