OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Use the <code>chrome.notifications</code> API to create rich notifications | 5 // Use the <code>chrome.notifications</code> API to create rich notifications |
6 // using templates and show these notifications to users in the system tray. | 6 // using templates and show these notifications to users in the system tray. |
7 namespace notifications { | 7 namespace notifications { |
8 [noinline_doc] enum TemplateType { | 8 [noinline_doc] enum TemplateType { |
9 // icon, title, message, expandedMessage, up to two buttons | 9 // icon, title, message, expandedMessage, up to two buttons |
10 basic, | 10 basic, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Sender's avatar, app icon, or a thumbnail for image notifications. | 46 // Sender's avatar, app icon, or a thumbnail for image notifications. |
47 DOMString? iconUrl; | 47 DOMString? iconUrl; |
48 [nodoc] NotificationBitmap? iconBitmap; | 48 [nodoc] NotificationBitmap? iconBitmap; |
49 | 49 |
50 // Title of the notification (e.g. sender name for email). | 50 // Title of the notification (e.g. sender name for email). |
51 DOMString? title; | 51 DOMString? title; |
52 | 52 |
53 // Main notification content. | 53 // Main notification content. |
54 DOMString? message; | 54 DOMString? message; |
55 | 55 |
| 56 // Alternate notification content with a lower-weight font. |
| 57 DOMString? contextMessage; |
| 58 |
56 // Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero | 59 // Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero |
57 // is default. | 60 // is default. |
58 long? priority; | 61 long? priority; |
59 | 62 |
60 // A timestamp associated with the notification, in milliseconds past the | 63 // A timestamp associated with the notification, in milliseconds past the |
61 // epoch (e.g. <code>Date.now() + n</code>). | 64 // epoch (e.g. <code>Date.now() + n</code>). |
62 double? eventTime; | 65 double? eventTime; |
63 | 66 |
64 // Text and icons for up to two notification action buttons. | 67 // Text and icons for up to two notification action buttons. |
65 NotificationButton[]? buttons; | 68 NotificationButton[]? buttons; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 static void onClosed(DOMString notificationId, boolean byUser); | 122 static void onClosed(DOMString notificationId, boolean byUser); |
120 | 123 |
121 // The user clicked in a non-button area of the notification. | 124 // The user clicked in a non-button area of the notification. |
122 static void onClicked(DOMString notificationId); | 125 static void onClicked(DOMString notificationId); |
123 | 126 |
124 // The user pressed a button in the notification. | 127 // The user pressed a button in the notification. |
125 static void onButtonClicked(DOMString notificationId, long buttonIndex); | 128 static void onButtonClicked(DOMString notificationId, long buttonIndex); |
126 }; | 129 }; |
127 | 130 |
128 }; | 131 }; |
OLD | NEW |