/src/serenity/Userland/Libraries/LibWeb/MediaSourceExtensions/MediaSource.cpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <LibWeb/Bindings/Intrinsics.h> |
8 | | #include <LibWeb/Bindings/MediaSourcePrototype.h> |
9 | | #include <LibWeb/MediaSourceExtensions/MediaSource.h> |
10 | | |
11 | | namespace Web::MediaSourceExtensions { |
12 | | |
13 | | JS_DEFINE_ALLOCATOR(MediaSource); |
14 | | |
15 | | WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaSource>> MediaSource::construct_impl(JS::Realm& realm) |
16 | 0 | { |
17 | 0 | return realm.heap().allocate<MediaSource>(realm, realm); |
18 | 0 | } |
19 | | |
20 | | MediaSource::MediaSource(JS::Realm& realm) |
21 | 0 | : DOM::EventTarget(realm) |
22 | 0 | { |
23 | 0 | } |
24 | | |
25 | 0 | MediaSource::~MediaSource() = default; |
26 | | |
27 | | void MediaSource::initialize(JS::Realm& realm) |
28 | 0 | { |
29 | 0 | Base::initialize(realm); |
30 | 0 | WEB_SET_PROTOTYPE_FOR_INTERFACE(MediaSource); |
31 | 0 | } |
32 | | |
33 | | } |