Task.h 553 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Variant.h>
  8. #include <LibJS/Forward.h>
  9. #include <LibJS/Heap/GCPtr.h>
  10. #include <LibJS/SafeFunction.h>
  11. #include <LibWeb/Forward.h>
  12. namespace Web::Fetch::Infrastructure {
  13. // FIXME: 'or a parallel queue'
  14. using TaskDestination = Variant<Empty, JS::NonnullGCPtr<JS::Object>>;
  15. int queue_fetch_task(JS::Object&, Function<void()>);
  16. int queue_fetch_task(JS::NonnullGCPtr<FetchController>, JS::Object&, Function<void()>);
  17. }