1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

LibWeb: Move Fetch infra into the Web::Fetch::Infrastructure namespace

The Fetch spec unfortunately will cause a name clash between the Request
concept and the Request JS object - both cannot live in the Web::Fetch
namespace, and WrapperGenerator generally assumes `Web::<Name>` for
things living in the `<Name>/` subdirectory, so let's instead move infra
code into its own namespace - it already sits in a (sub-)subdirectory
anyway.
This commit is contained in:
Linus Groh 2022-07-17 23:52:02 +01:00
parent 4b415a23c1
commit 2726fc9c73
20 changed files with 41 additions and 41 deletions

View file

@ -55,7 +55,7 @@ public:
using RefCounted::unref;
ReadyState ready_state() const { return m_ready_state; };
Fetch::Status status() const { return m_status; };
Fetch::Infrastructure::Status status() const { return m_status; };
DOM::ExceptionOr<String> response_text() const;
DOM::ExceptionOr<JS::Value> response();
Bindings::XMLHttpRequestResponseType response_type() const { return m_response_type; }
@ -84,7 +84,7 @@ private:
virtual JS::Object* create_wrapper(JS::GlobalObject&) override;
void set_ready_state(ReadyState);
void set_status(Fetch::Status status) { m_status = status; }
void set_status(Fetch::Infrastructure::Status status) { m_status = status; }
void fire_progress_event(String const&, u64, u64);
MimeSniff::MimeType get_response_mime_type() const;
@ -93,14 +93,14 @@ private:
String get_text_response() const;
Optional<MimeSniff::MimeType> extract_mime_type(Fetch::HeaderList const& header_list) const;
Optional<MimeSniff::MimeType> extract_mime_type(Fetch::Infrastructure::HeaderList const& header_list) const;
explicit XMLHttpRequest(HTML::Window&);
NonnullRefPtr<HTML::Window> m_window;
ReadyState m_ready_state { ReadyState::Unsent };
Fetch::Status m_status { 0 };
Fetch::Infrastructure::Status m_status { 0 };
bool m_send { false };
u32 m_timeout { 0 };