Files
ladybird/Libraries/LibWeb/CredentialManagement/Credential.h
Shannon Booth fd44da6829 LibWeb/Bindings: Emit one bindings header and cpp per IDL
Previously, the LibWeb bindings generator would output multiple per
interface files like Prototype/Constructor/Namespace/GlobalMixin
depending on the contents of that IDL file.

This complicates the build system as it means that it does not know
what files will be generated without knowledge of the contents of that
IDL file.

Instead, for each IDL file only generate a single Bindings/<IDLFile>.h
and Bindings/<IDLFile>.cpp.
2026-04-21 07:36:13 +02:00

44 lines
1.0 KiB
C++

/*
* Copyright (c) 2025, Altomani Gianluca <altomanigianluca@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Forward.h>
#include <LibWeb/Bindings/Credential.h>
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/WebIDL/Promise.h>
namespace Web::CredentialManagement {
// https://www.w3.org/TR/credential-management-1/#credential
class Credential : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(Credential, Bindings::PlatformObject);
GC_DECLARE_ALLOCATOR(Credential);
public:
static GC::Ref<WebIDL::Promise> is_conditional_mediation_available(JS::VM&);
virtual ~Credential() override;
String const& id() const { return m_id; }
virtual String type() const = 0;
protected:
explicit Credential(JS::Realm&);
Credential(JS::Realm&, String id);
virtual void initialize(JS::Realm&) override;
String m_id;
};
// https://www.w3.org/TR/credential-management-1/#dictdef-credentialdata
struct CredentialData {
String id;
};
}