| Index: chrome/common/extensions/api/notifications.idl
|
| diff --git a/chrome/common/extensions/api/notifications.idl b/chrome/common/extensions/api/notifications.idl
|
| index da95e62c95a0c86116d435fe282fdccc2045521c..edbd58efde17b7841bbf39c1da2d02ecd916a6d7 100644
|
| --- a/chrome/common/extensions/api/notifications.idl
|
| +++ b/chrome/common/extensions/api/notifications.idl
|
| @@ -36,16 +36,30 @@ namespace notifications {
|
| DOMString message;
|
| };
|
|
|
| - [nodoc] dictionary NotificationBitmap {
|
| - long width;
|
| - long height;
|
| - ArrayBuffer? data;
|
| + // Contains an array of RGBA bitmap data, 32 bits per channel. |data|
|
| + // should therefore have a length equal to 4 * width * height.
|
| + dictionary BitmapData {
|
| + ArrayBuffer data;
|
| + double width;
|
| + double height;
|
| + };
|
| +
|
| + dictionary ImageRepresentation {
|
| + // The pixel ratio for which this bitmap is intended.
|
| + double density;
|
| +
|
| + // A URL from which the image will be downloaded.
|
| + (DOMString or BitmapData) src;
|
| };
|
|
|
| dictionary NotificationButton {
|
| DOMString title;
|
| +
|
| + // The icon used with the button. Useful for giving users immediate context,
|
| + // but title must provide all necessary information about the action to be
|
| + // taken. Either an icon URL or a spec must be provided.
|
| DOMString? iconUrl;
|
| - [nodoc] NotificationBitmap? iconBitmap;
|
| + ImageRepresentation[]? iconReps;
|
| };
|
|
|
| dictionary NotificationOptions {
|
| @@ -53,10 +67,12 @@ namespace notifications {
|
| // <em>Required for $(ref:notifications.create)</em> method.
|
| TemplateType? type;
|
|
|
| - // Sender's avatar, app icon, or a thumbnail for image notifications.
|
| - // <em>Required for $(ref:notifications.create)</em> method.
|
| + // Sender's avatar, app icon, or a thumbnail for image notifications. This
|
| + // image in the notification is most useful when it provides specific
|
| + // context, such as an avatar, or contact photo.
|
| + // Either an iconUrl or an ImageRepresentation must be provided.
|
| DOMString? iconUrl;
|
| - [nodoc] NotificationBitmap? iconBitmap;
|
| + ImageRepresentation[]? iconReps;
|
|
|
| // Title of the notification (e.g. sender name for email).
|
| // <em>Required for $(ref:notifications.create)</em> method.
|
| @@ -80,12 +96,14 @@ namespace notifications {
|
| // Text and icons for up to two notification action buttons.
|
| NotificationButton[]? buttons;
|
|
|
| - // Secondary notification content.
|
| - [nodoc] DOMString? expandedMessage;
|
| + // Secondary notification content. This field is deprecated and unused.
|
| + [deprecated] DOMString? expandedMessage;
|
|
|
| - // Image thumbnail for image-type notifications.
|
| + // Image thumbnail for image-type notifications. This field will be rendered
|
| + // in a very prominent position at a larger size than the icon. Either an
|
| + // imageUrl or an imageSpec must be provided.
|
| DOMString? imageUrl;
|
| - [nodoc] NotificationBitmap? imageBitmap;
|
| + ImageRepresentation[]? imageReps;
|
|
|
| // Items for multi-item notifications.
|
| NotificationItem[]? items;
|
|
|