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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 dictionary NotificationOptions { | 51 dictionary NotificationOptions { |
52 // Which type of notification to display. | 52 // Which type of notification to display. |
53 // <em>Required for $(ref:notifications.create)</em> method. | 53 // <em>Required for $(ref:notifications.create)</em> method. |
54 TemplateType? type; | 54 TemplateType? type; |
55 | 55 |
56 // Sender's avatar, app icon, or a thumbnail for image notifications. | 56 // Sender's avatar, app icon, or a thumbnail for image notifications. |
57 // <em>Required for $(ref:notifications.create)</em> method. | 57 // <em>Required for $(ref:notifications.create)</em> method. |
58 DOMString? iconUrl; | 58 DOMString? iconUrl; |
59 [nodoc] NotificationBitmap? iconBitmap; | 59 [nodoc] NotificationBitmap? iconBitmap; |
60 | 60 |
61 // Small icon | |
dewittj
2014/06/16 18:09:55
Can you explain about the alpha mask here and wher
liyanhou
2014/06/27 03:18:40
Done.
| |
62 DOMString? smallIconUrl; | |
63 [nodoc] NotificationBitmap? smallIconBitmap; | |
64 | |
61 // Title of the notification (e.g. sender name for email). | 65 // Title of the notification (e.g. sender name for email). |
62 // <em>Required for $(ref:notifications.create)</em> method. | 66 // <em>Required for $(ref:notifications.create)</em> method. |
63 DOMString? title; | 67 DOMString? title; |
64 | 68 |
65 // Main notification content. | 69 // Main notification content. |
66 // <em>Required for $(ref:notifications.create)</em> method. | 70 // <em>Required for $(ref:notifications.create)</em> method. |
67 DOMString? message; | 71 DOMString? message; |
68 | 72 |
69 // Alternate notification content with a lower-weight font. | 73 // Alternate notification content with a lower-weight font. |
70 DOMString? contextMessage; | 74 DOMString? contextMessage; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 static void onButtonClicked(DOMString notificationId, long buttonIndex); | 161 static void onButtonClicked(DOMString notificationId, long buttonIndex); |
158 | 162 |
159 // The user changes the permission level. | 163 // The user changes the permission level. |
160 static void onPermissionLevelChanged(PermissionLevel level); | 164 static void onPermissionLevelChanged(PermissionLevel level); |
161 | 165 |
162 // The user clicked on a link for the app's notification settings. | 166 // The user clicked on a link for the app's notification settings. |
163 static void onShowSettings(); | 167 static void onShowSettings(); |
164 }; | 168 }; |
165 | 169 |
166 }; | 170 }; |
OLD | NEW |