| Index: chrome/common/extensions/api/notifications.idl
|
| diff --git a/chrome/common/extensions/api/notifications.idl b/chrome/common/extensions/api/notifications.idl
|
| index fb1fe65b98977bd6430b043c8f92f0af55287492..7b416053fad2a2ca82ea8186f847b971c0297304 100644
|
| --- a/chrome/common/extensions/api/notifications.idl
|
| +++ b/chrome/common/extensions/api/notifications.idl
|
| @@ -124,31 +124,40 @@ namespace notifications {
|
|
|
| interface Functions {
|
| // Creates and displays a notification.
|
| - // |notificationId|: Identifier of the notification. If it is empty, this
|
| - // method generates an id. If it matches an existing notification, this
|
| - // method first clears that notification before proceeding with the create
|
| - // operation.
|
| + // |notificationId|: Identifier of the notification. If not set or empty, an
|
| + // ID will automatically be generated. If it matches an existing
|
| + // notification, this method first clears that notification before
|
| + // proceeding with the create operation.
|
| + //
|
| + // The <code>notificationId</code> parameter is required before Chrome 42.
|
| // |options|: Contents of the notification.
|
| // |callback|: Returns the notification id (either supplied or generated)
|
| // that represents the created notification.
|
| - static void create(DOMString notificationId,
|
| + //
|
| + // The callback is required before Chrome 42.
|
| + static void create(optional DOMString notificationId,
|
| NotificationOptions options,
|
| - CreateCallback callback);
|
| + optional CreateCallback callback);
|
|
|
| // Updates an existing notification.
|
| // |notificationId|: The id of the notification to be updated. This is
|
| // returned by $(ref:notifications.create) method.
|
| // |options|: Contents of the notification to update to.
|
| // |callback|: Called to indicate whether a matching notification existed.
|
| + //
|
| + // The callback is required before Chrome 42.
|
| static void update(DOMString notificationId,
|
| NotificationOptions options,
|
| - UpdateCallback callback);
|
| + optional UpdateCallback callback);
|
|
|
| // Clears the specified notification.
|
| // |notificationId|: The id of the notification to be cleared. This is
|
| // returned by $(ref:notifications.create) method.
|
| // |callback|: Called to indicate whether a matching notification existed.
|
| - static void clear(DOMString notificationId, ClearCallback callback);
|
| + //
|
| + // The callback is required before Chrome 42.
|
| + static void clear(DOMString notificationId,
|
| + optional ClearCallback callback);
|
|
|
| // Retrieves all the notifications.
|
| // |callback|: Returns the set of notification_ids currently in the system.
|
|
|