| 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 // The alpha channel of app icon mask will be masked with white |
| 62 // foreground and grey background, displayed on the bottom right corner |
| 63 // of a notification |
| 64 DOMString? appIconMaskUrl; |
| 65 [nodoc] NotificationBitmap? appIconMaskBitmap; |
| 66 |
| 61 // Title of the notification (e.g. sender name for email). | 67 // Title of the notification (e.g. sender name for email). |
| 62 // <em>Required for $(ref:notifications.create)</em> method. | 68 // <em>Required for $(ref:notifications.create)</em> method. |
| 63 DOMString? title; | 69 DOMString? title; |
| 64 | 70 |
| 65 // Main notification content. | 71 // Main notification content. |
| 66 // <em>Required for $(ref:notifications.create)</em> method. | 72 // <em>Required for $(ref:notifications.create)</em> method. |
| 67 DOMString? message; | 73 DOMString? message; |
| 68 | 74 |
| 69 // Alternate notification content with a lower-weight font. | 75 // Alternate notification content with a lower-weight font. |
| 70 DOMString? contextMessage; | 76 DOMString? contextMessage; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 static void onButtonClicked(DOMString notificationId, long buttonIndex); | 163 static void onButtonClicked(DOMString notificationId, long buttonIndex); |
| 158 | 164 |
| 159 // The user changes the permission level. | 165 // The user changes the permission level. |
| 160 static void onPermissionLevelChanged(PermissionLevel level); | 166 static void onPermissionLevelChanged(PermissionLevel level); |
| 161 | 167 |
| 162 // The user clicked on a link for the app's notification settings. | 168 // The user clicked on a link for the app's notification settings. |
| 163 static void onShowSettings(); | 169 static void onShowSettings(); |
| 164 }; | 170 }; |
| 165 | 171 |
| 166 }; | 172 }; |
| OLD | NEW |