UserActivation.h 676 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Bindings/PlatformObject.h>
  8. namespace Web::HTML {
  9. class UserActivation final : public Bindings::PlatformObject {
  10. WEB_PLATFORM_OBJECT(UserActivation, Bindings::PlatformObject);
  11. GC_DECLARE_ALLOCATOR(UserActivation);
  12. public:
  13. static WebIDL::ExceptionOr<GC::Ref<UserActivation>> construct_impl(JS::Realm&);
  14. virtual ~UserActivation() override = default;
  15. bool has_been_active() const;
  16. bool is_active() const;
  17. private:
  18. UserActivation(JS::Realm&);
  19. virtual void initialize(JS::Realm&) override;
  20. };
  21. }