ladybird/Libraries/LibWeb/CredentialManagement/CredentialsContainer.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

39 lines
1.2 KiB
C++

/*
* Copyright (c) 2025, Altomani Gianluca <altomanigianluca@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Optional.h>
#include <LibJS/Forward.h>
#include <LibWeb/Bindings/CredentialsContainer.h>
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/CredentialManagement/Credential.h>
#include <LibWeb/CredentialManagement/FederatedCredential.h>
#include <LibWeb/CredentialManagement/PasswordCredential.h>
#include <LibWeb/DOM/AbortSignal.h>
namespace Web::CredentialManagement {
class CredentialsContainer final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(CredentialsContainer, Bindings::PlatformObject);
GC_DECLARE_ALLOCATOR(CredentialsContainer);
public:
[[nodiscard]] static GC::Ref<CredentialsContainer> create(JS::Realm&);
virtual ~CredentialsContainer() override;
GC::Ref<WebIDL::Promise> get(Bindings::CredentialRequestOptions const& options);
GC::Ref<WebIDL::Promise> store(Credential const& credential);
GC::Ref<WebIDL::Promise> create(Bindings::CredentialCreationOptions const& options);
GC::Ref<WebIDL::Promise> prevent_silent_access();
private:
explicit CredentialsContainer(JS::Realm&);
virtual void initialize(JS::Realm&) override;
};
}