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

Side by Side 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, 8 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 unified diff | Download patch
« no previous file with comments | « modules/nfc/NavigatorNFC.idl ('k') | modules/notifications/NotificationAction.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 11 matching lines...) Expand all
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 // https://notifications.spec.whatwg.org/#enumdef-notificationpermission
33
34 enum NotificationPermission {
35 "default",
36 "denied",
37 "granted"
38 };
39
40 // https://notifications.spec.whatwg.org/#api
41
32 [ 42 [
33 GarbageCollected, 43 GarbageCollected,
34 ActiveDOMObject, 44 DependentLifetime,
35 Constructor(DOMString title, optional NotificationOptions options), 45 Constructor(DOMString title, optional NotificationOptions options),
36 ConstructorCallWith=ExecutionContext, 46 ConstructorCallWith=ExecutionContext,
37 Exposed=(Window,Worker), 47 Exposed=(Window,Worker),
38 MeasureAs=NotificationCreated, 48 MeasureAs=NotificationCreated,
39 RaisesException=Constructor, 49 RaisesException=Constructor,
40 RuntimeEnabled=Notifications, 50 RuntimeEnabled=Notifications,
41 ] interface Notification : EventTarget { 51 ] interface Notification : EventTarget {
42 [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonl y attribute DOMString permission; 52 [CallWith=ExecutionContext, MeasureAs=NotificationPermission] static readonl y attribute NotificationPermission permission;
43 [CallWith=ExecutionContext, MeasureAs=NotificationPermissionRequested] stati c void requestPermission(optional NotificationPermissionCallback callback);
44 53
45 // FIXME: Implement the Notification.get() method. 54 [CallWith=ScriptState, Exposed=Window, MeasureAs=NotificationPermissionReque sted] static Promise<NotificationPermission> requestPermission(optional Notifica tionPermissionCallback deprecatedCallback);
55
56 static readonly attribute unsigned long maxActions;
46 57
47 attribute EventHandler onclick; 58 attribute EventHandler onclick;
48 [MeasureAs=NotificationShowEvent] attribute EventHandler onshow; 59 [MeasureAs=NotificationShowEvent] attribute EventHandler onshow;
49 attribute EventHandler onerror; 60 attribute EventHandler onerror;
50 [MeasureAs=NotificationCloseEvent] attribute EventHandler onclose; 61 [MeasureAs=NotificationCloseEvent] attribute EventHandler onclose;
51 62
52 readonly attribute DOMString title; 63 readonly attribute DOMString title;
53 readonly attribute DOMString dir; 64 readonly attribute DOMString dir;
54 readonly attribute DOMString lang; 65 readonly attribute DOMString lang;
55 readonly attribute DOMString body; 66 readonly attribute DOMString body;
56 readonly attribute DOMString tag; 67 readonly attribute DOMString tag;
57 readonly attribute DOMString icon; 68 readonly attribute USVString icon;
58 69
59 [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<unsign ed long>? vibrate; 70 [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<unsign ed long>? vibrate;
71 readonly attribute DOMTimeStamp timestamp;
72 readonly attribute boolean renotify;
60 readonly attribute boolean silent; 73 readonly attribute boolean silent;
61 [CallWith=ScriptState] readonly attribute any data; 74 readonly attribute boolean requireInteraction;
75 [CallWith=ScriptState, SameObject] readonly attribute any data;
76
77 // TODO(johnme): Ship once Blink supports FrozenArray (https://crbug.com/515 920)
78 // and we've implemented the additional Object.freeze described in
79 // https://notifications.spec.whatwg.org/#dom-notification-actions
80 [RuntimeEnabled=NotificationExperimental] readonly attribute sequence<Notifi cationAction> actions;
62 81
63 [MeasureAs=NotificationClosed] void close(); 82 [MeasureAs=NotificationClosed] void close();
64 }; 83 };
OLDNEW
« 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