ladybird/Libraries/LibWeb/Internals/XRTest.h
Shannon Booth 5adfd1c43a LibWeb/Bindings: Generate struct definitions from IDL dictionaries
Previously we were inconsistent by generating code for enum definitions
but not generating code for dictionaries. With future changes to the
IDL generator to expose helpers to convert to and from IDL values
this produced circular depdendencies. To solve this problem, also
generate the dictionary definitions in bindings headers.
2026-05-09 10:49:49 +02:00

34 lines
820 B
C++

/*
* Copyright (c) 2025, Psychpsyo <psychpsyo@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Internals/FakeXRDevice.h>
#include <LibWeb/Internals/InternalsBase.h>
namespace Web::Internals {
// https://github.com/immersive-web/webxr-test-api/blob/main/explainer.md
class WEB_API XRTest final : public InternalsBase {
WEB_PLATFORM_OBJECT(XRTest, InternalsBase);
GC_DECLARE_ALLOCATOR(XRTest);
public:
virtual ~XRTest() override;
GC::Ref<WebIDL::Promise> simulate_device_connection(Bindings::FakeXRDeviceInit const&) const;
void simulate_user_activation(GC::Ref<WebIDL::CallbackType>) const;
GC::Ref<WebIDL::Promise> disconnect_all_devices() const;
private:
explicit XRTest(JS::Realm&);
virtual void initialize(JS::Realm&) override;
};
}