Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: modules/notifications/Notification.idl

Issue 2786203002: Roll 50: Copied IDLs, PYTHON scripts from WebKit removed deleted files in WebCore (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/nfc/NavigatorNFC.idl ('k') | modules/notifications/NotificationAction.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/notifications/Notification.idl
diff --git a/modules/notifications/Notification.idl b/modules/notifications/Notification.idl
index 0ad1096f9b3577e8cbf72eccec2bf20c9eec53bb..8ad23a1223573ac6d09b6509cf542ca6a931f66c 100644
--- a/modules/notifications/Notification.idl
+++ b/modules/notifications/Notification.idl
@@ -29,9 +29,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// https://notifications.spec.whatwg.org/#enumdef-notificationpermission
+
+enum NotificationPermission {
+ "default",
+ "denied",
+ "granted"
+};
+
+// https://notifications.spec.whatwg.org/#api
+
[
GarbageCollected,
- ActiveDOMObject,
+ DependentLifetime,
Constructor(DOMString title, optional NotificationOptions options),
ConstructorCallWith=ExecutionContext,
Exposed=(Window,Worker),
@@ -39,10 +49,11 @@
RaisesException=Constructor,
RuntimeEnabled=Notifications,
] interface Notification : EventTarget {
- [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonly attribute DOMString permission;
- [CallWith=ExecutionContext, MeasureAs=NotificationPermissionRequested] static void requestPermission(optional NotificationPermissionCallback callback);
+ [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonly attribute NotificationPermission permission;
+
+ [CallWith=ScriptState, Exposed=Window, MeasureAs=NotificationPermissionRequested] static Promise<NotificationPermission> requestPermission(optional NotificationPermissionCallback deprecatedCallback);
- // FIXME: Implement the Notification.get() method.
+ static readonly attribute unsigned long maxActions;
attribute EventHandler onclick;
[MeasureAs=NotificationShowEvent] attribute EventHandler onshow;
@@ -54,11 +65,19 @@
readonly attribute DOMString lang;
readonly attribute DOMString body;
readonly attribute DOMString tag;
- readonly attribute DOMString icon;
+ readonly attribute USVString icon;
[RuntimeEnabled=NotificationExperimental] readonly attribute sequence<unsigned long>? vibrate;
+ readonly attribute DOMTimeStamp timestamp;
+ readonly attribute boolean renotify;
readonly attribute boolean silent;
- [CallWith=ScriptState] readonly attribute any data;
+ readonly attribute boolean requireInteraction;
+ [CallWith=ScriptState, SameObject] readonly attribute any data;
+
+ // TODO(johnme): Ship once Blink supports FrozenArray (https://crbug.com/515920)
+ // and we've implemented the additional Object.freeze described in
+ // https://notifications.spec.whatwg.org/#dom-notification-actions
+ [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<NotificationAction> actions;
[MeasureAs=NotificationClosed] void close();
};
« no previous file with comments | « modules/nfc/NavigatorNFC.idl ('k') | modules/notifications/NotificationAction.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698