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

Unified Diff: chrome/common/extensions/api/experimental_notification.idl

Issue 12334047: Adding user data to the notification options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental_notification.idl
diff --git a/chrome/common/extensions/api/experimental_notification.idl b/chrome/common/extensions/api/experimental_notification.idl
index 582c9b63153f69c753f10c17994e6f2836571a0d..7b8a431b250680e8e540c988b6756fe7eae0ddc3 100644
--- a/chrome/common/extensions/api/experimental_notification.idl
+++ b/chrome/common/extensions/api/experimental_notification.idl
@@ -68,6 +68,9 @@
// Items for multi-item notifications.
NotificationItem[]? items;
+
+ // User data for the notification.
+ DOMString? userData;
dharcourt 2013/02/22 21:35:30 If this object will have the same restriction as t
vadimt 2013/02/22 22:38:44 Yes. Object is better than string.
};
callback CreateCallback = void (DOMString notificationId);
@@ -76,6 +79,10 @@
callback DeleteCallback = void (boolean wasDeleted);
+ callback GetAllNotificationsCallback = void (
+ DOMString[] notificationsIds,
+ NotificationOptions[] notificationsOptions);
+
dharcourt 2013/02/22 21:35:30 How about returning a notificationsInfo object whi
vadimt 2013/02/22 22:38:44 Based on the offline discussion, it seems like we'
interface Functions {
// Creates and displays a notification having the contents in |options|,
// identified by the id |notificationId|. If |notificationId| is empty,
@@ -98,6 +105,9 @@
// corresponding notification. |callback| indicates whether a matching
// notification existed.
static void delete(DOMString notificationId, DeleteCallback callback);
+
+ // Returns to |callback| ids and options of all notifications.
+ static void getAllNotifications(GetAllNotificationsCallback callback);
dharcourt 2013/02/22 21:35:30 How about getNotification(selector, callback), whe
vadimt 2013/02/22 22:38:44 My usecase requires only getting all notifications
};
interface Events {
@@ -107,13 +117,18 @@
static void onDisplayed(DOMString notificationId);
// The notification closed, either by the system or by user action.
- static void onClosed(DOMString notificationId, boolean byUser);
+ static void onClosed(DOMString notificationId,
+ boolean byUser,
+ NotificationOptions options);
// The user clicked in a non-button area of the notification.
- static void onClicked(DOMString notificationId);
+ static void onClicked(DOMString notificationId,
+ NotificationOptions options);
// The user pressed a button in the notification.
- static void onButtonClicked(DOMString notificationId, long buttonIndex);
+ static void onButtonClicked(DOMString notificationId,
+ long buttonIndex,
+ NotificationOptions options);
};
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698