| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.notificationProvider</code> API to intercept | 5 // Use the <code>chrome.notificationProvider</code> API to intercept |
| 6 // notifications that would otherwise go into the Chrome Notification Center, | 6 // notifications that would otherwise go into the Chrome Notification Center, |
| 7 // get notifiers' information, and inform notifiers about users' actions on the | 7 // get notifiers' information, and inform notifiers about users' actions on the |
| 8 // notifications. | 8 // notifications. |
| 9 namespace notificationProvider { | 9 [use_movable_types=true] namespace notificationProvider { |
| 10 | 10 |
| 11 // TODO(liyanhou): Use notifications.PermissionLevel everywhere and delete | 11 // TODO(liyanhou): Use notifications.PermissionLevel everywhere and delete |
| 12 // this type. See http://crbug.com/398266. | 12 // this type. See http://crbug.com/398266. |
| 13 | 13 |
| 14 // whether notifications from this notifier is permitted or blocked. | 14 // whether notifications from this notifier is permitted or blocked. |
| 15 enum NotifierPermissionLevel { | 15 enum NotifierPermissionLevel { |
| 16 // User has elected to show notifications from the notifier. | 16 // User has elected to show notifications from the notifier. |
| 17 // This is the default at install time. | 17 // This is the default at install time. |
| 18 granted, | 18 granted, |
| 19 | 19 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 static void onUpdated(DOMString notifierId, | 140 static void onUpdated(DOMString notifierId, |
| 141 DOMString notificationId, | 141 DOMString notificationId, |
| 142 notifications.NotificationOptions options); | 142 notifications.NotificationOptions options); |
| 143 | 143 |
| 144 // A notification is cleared by the notifier. | 144 // A notification is cleared by the notifier. |
| 145 // |notifierId|: The id of the notifier that cleared the notification. | 145 // |notifierId|: The id of the notifier that cleared the notification. |
| 146 // |notificationId|: The id of the cleared notification. | 146 // |notificationId|: The id of the cleared notification. |
| 147 static void onCleared(DOMString notifierId, DOMString notificationId); | 147 static void onCleared(DOMString notifierId, DOMString notificationId); |
| 148 }; | 148 }; |
| 149 }; | 149 }; |
| OLD | NEW |