| OLD | NEW | 
|---|
| 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 15 matching lines...) Expand all  Loading... | 
| 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 [ | 32 [ | 
| 33     Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS, | 33     Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS, | 
| 34     ActiveDOMObject, | 34     ActiveDOMObject, | 
| 35     EventTarget, | 35     EventTarget, | 
| 36 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS |  | 
| 37     Constructor(DOMString title, [Default=Undefined] optional Dictionary options
    ), | 36     Constructor(DOMString title, [Default=Undefined] optional Dictionary options
    ), | 
| 38     CallWith=ScriptExecutionContext, | 37     ConstructorCallWith=ScriptExecutionContext, | 
| 39 #else |  | 
| 40 #endif |  | 
| 41 ] interface Notification { | 38 ] interface Notification { | 
| 42     void show(); | 39     void show(); | 
| 43 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS | 40     [Conditional=LEGACY_NOTIFICATIONS] void cancel(); | 
| 44     void cancel(); | 41     [Conditional=NOTIFICATIONS] void close(); | 
| 45 #endif |  | 
| 46 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS |  | 
| 47     void close(); |  | 
| 48 #endif |  | 
| 49 | 42 | 
| 50 | 43 | 
| 51 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS | 44     [CallWith=ScriptExecutionContext, Conditional=NOTIFICATIONS] static readonly
     attribute DOMString permission; | 
| 52     [CallWith=ScriptExecutionContext] static readonly attribute DOMString permis
    sion; | 45     [CallWith=ScriptExecutionContext, Conditional=NOTIFICATIONS] static void req
    uestPermission(optional NotificationPermissionCallback callback); | 
| 53     [CallWith=ScriptExecutionContext] static void requestPermission(optional Not
    ificationPermissionCallback callback); |  | 
| 54 #endif |  | 
| 55 | 46 | 
| 56     attribute EventListener onshow; | 47     attribute EventListener onshow; | 
| 57 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS | 48     [Conditional=LEGACY_NOTIFICATIONS] attribute EventListener ondisplay; | 
| 58     attribute EventListener ondisplay; |  | 
| 59 #endif |  | 
| 60     attribute EventListener onerror; | 49     attribute EventListener onerror; | 
| 61     attribute EventListener onclose; | 50     attribute EventListener onclose; | 
| 62     attribute EventListener onclick; | 51     attribute EventListener onclick; | 
| 63 | 52 | 
| 64 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS | 53     [Conditional=LEGACY_NOTIFICATIONS] attribute DOMString dir; | 
| 65     attribute DOMString dir; | 54     [Conditional=LEGACY_NOTIFICATIONS] attribute DOMString replaceId; | 
| 66     attribute DOMString replaceId; | 55     [Conditional=NOTIFICATIONS] attribute DOMString tag; | 
| 67 #endif |  | 
| 68 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS |  | 
| 69     attribute DOMString tag; |  | 
| 70 #endif |  | 
| 71 | 56 | 
| 72     // EventTarget interface | 57     // EventTarget interface | 
| 73     void addEventListener(DOMString type, | 58     void addEventListener(DOMString type, | 
| 74                           EventListener listener, | 59                           EventListener listener, | 
| 75                           optional boolean useCapture); | 60                           optional boolean useCapture); | 
| 76     void removeEventListener(DOMString type, | 61     void removeEventListener(DOMString type, | 
| 77                              EventListener listener, | 62                              EventListener listener, | 
| 78                              optional boolean useCapture); | 63                              optional boolean useCapture); | 
| 79     [RaisesException] boolean dispatchEvent(Event evt); | 64     [RaisesException] boolean dispatchEvent(Event evt); | 
| 80 }; | 65 }; | 
| 81 | 66 | 
| OLD | NEW | 
|---|