| 1 | /* |
| 2 | * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. |
| 3 | * |
| 4 | * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions |
| 8 | * are met: |
| 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * 2. Redistributions in binary form must reproduce the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer in the |
| 13 | * documentation and/or other materials provided with the distribution. |
| 14 | * |
| 15 | * THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. ``AS IS'' AND ANY |
| 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 18 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 19 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #include "config.h" |
| 29 | #include "EventTargetHeaders.h" |
| 30 | |
| 31 | #include "JSDOMGlobalObject.h" |
| 32 | #include <JavaScriptCore/StructureInlines.h> |
| 33 | |
| 34 | namespace WebCore { |
| 35 | |
| 36 | JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, EventTarget& impl) |
| 37 | { |
| 38 | switch (impl.eventTargetInterface()) { |
| 39 | case AbortSignalEventTargetInterfaceType: |
| 40 | return toJS(state, globalObject, static_cast<AbortSignal&>(impl)); |
| 41 | #if ENABLE(APPLE_PAY) |
| 42 | case ApplePaySessionEventTargetInterfaceType: |
| 43 | return toJS(state, globalObject, static_cast<ApplePaySession&>(impl)); |
| 44 | #endif |
| 45 | #if ENABLE(WEB_AUDIO) |
| 46 | case AudioContextEventTargetInterfaceType: |
| 47 | return toJS(state, globalObject, static_cast<AudioContext&>(impl)); |
| 48 | #endif |
| 49 | #if ENABLE(WEB_AUDIO) |
| 50 | case AudioNodeEventTargetInterfaceType: |
| 51 | return toJS(state, globalObject, static_cast<AudioNode&>(impl)); |
| 52 | #endif |
| 53 | #if ENABLE(VIDEO_TRACK) |
| 54 | case AudioTrackListEventTargetInterfaceType: |
| 55 | return toJS(state, globalObject, static_cast<AudioTrackList&>(impl)); |
| 56 | #endif |
| 57 | case DOMApplicationCacheEventTargetInterfaceType: |
| 58 | return toJS(state, globalObject, static_cast<DOMApplicationCache&>(impl)); |
| 59 | case DOMWindowEventTargetInterfaceType: |
| 60 | return toJS(state, globalObject, static_cast<DOMWindow&>(impl)); |
| 61 | case DedicatedWorkerGlobalScopeEventTargetInterfaceType: |
| 62 | return toJS(state, globalObject, static_cast<DedicatedWorkerGlobalScope&>(impl)); |
| 63 | case EventSourceEventTargetInterfaceType: |
| 64 | return toJS(state, globalObject, static_cast<EventSource&>(impl)); |
| 65 | case FileReaderEventTargetInterfaceType: |
| 66 | return toJS(state, globalObject, static_cast<FileReader&>(impl)); |
| 67 | case FontFaceSetEventTargetInterfaceType: |
| 68 | return toJS(state, globalObject, static_cast<FontFaceSet&>(impl)); |
| 69 | #if ENABLE(INDEXED_DATABASE) |
| 70 | case IDBDatabaseEventTargetInterfaceType: |
| 71 | return toJS(state, globalObject, static_cast<IDBDatabase&>(impl)); |
| 72 | #endif |
| 73 | #if ENABLE(INDEXED_DATABASE) |
| 74 | case IDBOpenDBRequestEventTargetInterfaceType: |
| 75 | return toJS(state, globalObject, static_cast<IDBOpenDBRequest&>(impl)); |
| 76 | #endif |
| 77 | #if ENABLE(INDEXED_DATABASE) |
| 78 | case IDBRequestEventTargetInterfaceType: |
| 79 | return toJS(state, globalObject, static_cast<IDBRequest&>(impl)); |
| 80 | #endif |
| 81 | #if ENABLE(INDEXED_DATABASE) |
| 82 | case IDBTransactionEventTargetInterfaceType: |
| 83 | return toJS(state, globalObject, static_cast<IDBTransaction&>(impl)); |
| 84 | #endif |
| 85 | #if ENABLE(VIDEO) |
| 86 | case MediaControllerEventTargetInterfaceType: |
| 87 | return toJS(state, globalObject, static_cast<MediaController&>(impl)); |
| 88 | #endif |
| 89 | #if ENABLE(MEDIA_STREAM) |
| 90 | case MediaDevicesEventTargetInterfaceType: |
| 91 | return toJS(state, globalObject, static_cast<MediaDevices&>(impl)); |
| 92 | #endif |
| 93 | #if ENABLE(ENCRYPTED_MEDIA) |
| 94 | case MediaKeySessionEventTargetInterfaceType: |
| 95 | return toJS(state, globalObject, static_cast<MediaKeySession&>(impl)); |
| 96 | #endif |
| 97 | #if ENABLE(MEDIA_STREAM) |
| 98 | case MediaRecorderEventTargetInterfaceType: |
| 99 | return toJS(state, globalObject, static_cast<MediaRecorder&>(impl)); |
| 100 | #endif |
| 101 | #if ENABLE(MEDIA_SESSION) |
| 102 | case MediaRemoteControlsEventTargetInterfaceType: |
| 103 | return toJS(state, globalObject, static_cast<MediaRemoteControls&>(impl)); |
| 104 | #endif |
| 105 | #if ENABLE(MEDIA_SOURCE) |
| 106 | case MediaSourceEventTargetInterfaceType: |
| 107 | return toJS(state, globalObject, static_cast<MediaSource&>(impl)); |
| 108 | #endif |
| 109 | #if ENABLE(MEDIA_STREAM) |
| 110 | case MediaStreamEventTargetInterfaceType: |
| 111 | return toJS(state, globalObject, static_cast<MediaStream&>(impl)); |
| 112 | #endif |
| 113 | #if ENABLE(MEDIA_STREAM) |
| 114 | case MediaStreamTrackEventTargetInterfaceType: |
| 115 | return toJS(state, globalObject, static_cast<MediaStreamTrack&>(impl)); |
| 116 | #endif |
| 117 | case MessagePortEventTargetInterfaceType: |
| 118 | return toJS(state, globalObject, static_cast<MessagePort&>(impl)); |
| 119 | case NodeEventTargetInterfaceType: |
| 120 | return toJS(state, globalObject, static_cast<Node&>(impl)); |
| 121 | #if ENABLE(NOTIFICATIONS) |
| 122 | case NotificationEventTargetInterfaceType: |
| 123 | return toJS(state, globalObject, static_cast<Notification&>(impl)); |
| 124 | #endif |
| 125 | case OffscreenCanvasEventTargetInterfaceType: |
| 126 | return toJS(state, globalObject, static_cast<OffscreenCanvas&>(impl)); |
| 127 | #if ENABLE(PAYMENT_REQUEST) |
| 128 | case PaymentRequestEventTargetInterfaceType: |
| 129 | return toJS(state, globalObject, static_cast<PaymentRequest&>(impl)); |
| 130 | #endif |
| 131 | #if ENABLE(PAYMENT_REQUEST) |
| 132 | case PaymentResponseEventTargetInterfaceType: |
| 133 | return toJS(state, globalObject, static_cast<PaymentResponse&>(impl)); |
| 134 | #endif |
| 135 | case PerformanceEventTargetInterfaceType: |
| 136 | return toJS(state, globalObject, static_cast<Performance&>(impl)); |
| 137 | #if ENABLE(WEB_RTC_DTMF) |
| 138 | case RTCDTMFSenderEventTargetInterfaceType: |
| 139 | return toJS(state, globalObject, static_cast<RTCDTMFSender&>(impl)); |
| 140 | #endif |
| 141 | #if ENABLE(WEB_RTC) |
| 142 | case RTCDataChannelEventTargetInterfaceType: |
| 143 | return toJS(state, globalObject, static_cast<RTCDataChannel&>(impl)); |
| 144 | #endif |
| 145 | #if ENABLE(WEB_RTC) |
| 146 | case RTCPeerConnectionEventTargetInterfaceType: |
| 147 | return toJS(state, globalObject, static_cast<RTCPeerConnection&>(impl)); |
| 148 | #endif |
| 149 | #if ENABLE(SERVICE_WORKER) |
| 150 | case ServiceWorkerEventTargetInterfaceType: |
| 151 | return toJS(state, globalObject, static_cast<ServiceWorker&>(impl)); |
| 152 | #endif |
| 153 | #if ENABLE(SERVICE_WORKER) |
| 154 | case ServiceWorkerContainerEventTargetInterfaceType: |
| 155 | return toJS(state, globalObject, static_cast<ServiceWorkerContainer&>(impl)); |
| 156 | #endif |
| 157 | #if ENABLE(SERVICE_WORKER) |
| 158 | case ServiceWorkerGlobalScopeEventTargetInterfaceType: |
| 159 | return toJS(state, globalObject, static_cast<ServiceWorkerGlobalScope&>(impl)); |
| 160 | #endif |
| 161 | #if ENABLE(SERVICE_WORKER) |
| 162 | case ServiceWorkerRegistrationEventTargetInterfaceType: |
| 163 | return toJS(state, globalObject, static_cast<ServiceWorkerRegistration&>(impl)); |
| 164 | #endif |
| 165 | #if ENABLE(MEDIA_SOURCE) |
| 166 | case SourceBufferEventTargetInterfaceType: |
| 167 | return toJS(state, globalObject, static_cast<SourceBuffer&>(impl)); |
| 168 | #endif |
| 169 | #if ENABLE(MEDIA_SOURCE) |
| 170 | case SourceBufferListEventTargetInterfaceType: |
| 171 | return toJS(state, globalObject, static_cast<SourceBufferList&>(impl)); |
| 172 | #endif |
| 173 | #if ENABLE(SPEECH_SYNTHESIS) |
| 174 | case SpeechSynthesisUtteranceEventTargetInterfaceType: |
| 175 | return toJS(state, globalObject, static_cast<SpeechSynthesisUtterance&>(impl)); |
| 176 | #endif |
| 177 | #if ENABLE(VIDEO_TRACK) |
| 178 | case TextTrackEventTargetInterfaceType: |
| 179 | return toJS(state, globalObject, static_cast<TextTrack&>(impl)); |
| 180 | #endif |
| 181 | #if ENABLE(VIDEO_TRACK) |
| 182 | case TextTrackCueEventTargetInterfaceType: |
| 183 | return toJS(state, globalObject, static_cast<TextTrackCue&>(impl)); |
| 184 | #endif |
| 185 | #if ENABLE(VIDEO_TRACK) |
| 186 | case TextTrackListEventTargetInterfaceType: |
| 187 | return toJS(state, globalObject, static_cast<TextTrackList&>(impl)); |
| 188 | #endif |
| 189 | case VRDisplayEventTargetInterfaceType: |
| 190 | return toJS(state, globalObject, static_cast<VRDisplay&>(impl)); |
| 191 | #if ENABLE(VIDEO_TRACK) |
| 192 | case VideoTrackListEventTargetInterfaceType: |
| 193 | return toJS(state, globalObject, static_cast<VideoTrackList&>(impl)); |
| 194 | #endif |
| 195 | case VisualViewportEventTargetInterfaceType: |
| 196 | return toJS(state, globalObject, static_cast<VisualViewport&>(impl)); |
| 197 | case WebAnimationEventTargetInterfaceType: |
| 198 | return toJS(state, globalObject, static_cast<WebAnimation&>(impl)); |
| 199 | #if ENABLE(LEGACY_ENCRYPTED_MEDIA) |
| 200 | case WebKitMediaKeySessionEventTargetInterfaceType: |
| 201 | return toJS(state, globalObject, static_cast<WebKitMediaKeySession&>(impl)); |
| 202 | #endif |
| 203 | case WebSocketEventTargetInterfaceType: |
| 204 | return toJS(state, globalObject, static_cast<WebSocket&>(impl)); |
| 205 | case WorkerEventTargetInterfaceType: |
| 206 | return toJS(state, globalObject, static_cast<Worker&>(impl)); |
| 207 | #if ENABLE(CSS_PAINTING_API) |
| 208 | case WorkletGlobalScopeEventTargetInterfaceType: |
| 209 | return toJS(state, globalObject, static_cast<WorkletGlobalScope&>(impl)); |
| 210 | #endif |
| 211 | case XMLHttpRequestEventTargetInterfaceType: |
| 212 | return toJS(state, globalObject, static_cast<XMLHttpRequest&>(impl)); |
| 213 | case XMLHttpRequestUploadEventTargetInterfaceType: |
| 214 | return toJS(state, globalObject, static_cast<XMLHttpRequestUpload&>(impl)); |
| 215 | } |
| 216 | ASSERT_NOT_REACHED(); |
| 217 | return JSC::jsNull(); |
| 218 | } |
| 219 | |
| 220 | } // namespace WebCore |
| 221 | |