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..2060fd589d5fb31e64f8be4c2914163792d209c0 100644 |
--- a/chrome/common/extensions/api/notifications.idl |
+++ b/chrome/common/extensions/api/notifications.idl |
@@ -36,16 +36,27 @@ 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 scale; |
+ // A URL from which the image will be downloaded. |
+ (DOMString or BitmapData) data; |
}; |
dictionary NotificationButton { |
DOMString title; |
+ // The icon used with the button. Either an icon URL or a spec must be |
+ // provided. |
DOMString? iconUrl; |
- [nodoc] NotificationBitmap? iconBitmap; |
+ ImageRepresentation[]? icons; |
benwells
2014/06/27 03:15:27
I think having these names be plural is confusing.
dewittj
2014/07/01 15:06:11
Done.
|
}; |
dictionary NotificationOptions { |
@@ -54,9 +65,9 @@ namespace notifications { |
TemplateType? type; |
// Sender's avatar, app icon, or a thumbnail for image notifications. |
benwells
2014/06/27 03:15:27
Are we intending notifications to have app icons h
dewittj
2014/07/01 15:06:11
We haven't been too prescriptive about what is acc
benwells
2014/07/02 03:11:11
I was thinking about the comment here not the name
|
- // <em>Required for $(ref:notifications.create)</em> method. |
+ // Either an iconUrl or a ImageRepresentation must be provided. |
DOMString? iconUrl; |
- [nodoc] NotificationBitmap? iconBitmap; |
+ ImageRepresentation[]? icons; |
// Title of the notification (e.g. sender name for email). |
// <em>Required for $(ref:notifications.create)</em> method. |
@@ -80,12 +91,13 @@ 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. Either an imageUrl or an imageSpec |
+ // must be provided. |
DOMString? imageUrl; |
- [nodoc] NotificationBitmap? imageBitmap; |
+ ImageRepresentation[]? images; |
// Items for multi-item notifications. |
NotificationItem[]? items; |