Fix build for non-iOS platforms. :|
[WebKit-https.git] / Source / WebCore / Modules / notifications / Notification.idl
index 9fe91f8..1ddf5b3 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface [
+[
     Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS,
     ActiveDOMObject,
     EventTarget,
 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
-    Constructor(in DOMString title, in [Optional=DefaultIsUndefined] Dictionary options),
-    CallWith=ScriptExecutionContext,
-#else
-    OmitConstructor
+    Constructor(DOMString title, [Default=Undefined] optional Dictionary options),
+    ConstructorCallWith=Document,
 #endif
-] Notification {
+] interface Notification {
     void show();
 #if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
     void cancel();
@@ -50,8 +48,8 @@ interface [
 
 
 #if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
-    static readonly attribute [CallWith=ScriptExecutionContext] DOMString permission;
-    [Custom] static void requestPermission(in NotificationPermissionCallback callback);
+    [CallWith=ScriptExecutionContext] static readonly attribute DOMString permission;
+    [CallWith=ScriptExecutionContext] static void requestPermission(optional NotificationPermissionCallback callback);
 #endif
 
     attribute EventListener onshow;
@@ -71,13 +69,12 @@ interface [
 #endif
 
     // EventTarget interface
-    void addEventListener(in DOMString type, 
-                          in EventListener listener, 
-                          in [Optional] boolean useCapture);
-    void removeEventListener(in DOMString type, 
-                             in EventListener listener, 
-                             in [Optional] boolean useCapture);
-    boolean dispatchEvent(in Event evt)
-        raises(EventException);
+    void addEventListener(DOMString type, 
+                          EventListener listener, 
+                          optional boolean useCapture);
+    void removeEventListener(DOMString type, 
+                             EventListener listener, 
+                             optional boolean useCapture);
+    [RaisesException] boolean dispatchEvent(Event evt);
 };