1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:22:07 +00:00

LibWeb: Add the Web::URL namespace and move URLEncoder to it

This namespace will be used for all interfaces defined in the URL
specification, like URL and URLSearchParams.

This has the unfortunate side-effect of requiring us to use the fully
qualified AK::URL name whenever we want to refer to the AK class, so
this commit also fixes all such references.
This commit is contained in:
Idan Horowitz 2021-09-13 00:33:23 +03:00 committed by Andreas Kling
parent 2b78e227f2
commit 4629f2e4ad
54 changed files with 236 additions and 225 deletions

View file

@ -35,7 +35,7 @@ class WebSocketClientManager : public Core::Object {
public:
static WebSocketClientManager& the();
RefPtr<Protocol::WebSocket> connect(const URL&);
RefPtr<Protocol::WebSocket> connect(const AK::URL&);
private:
WebSocketClientManager();
@ -57,7 +57,7 @@ public:
using WrapperType = Bindings::WebSocketWrapper;
static NonnullRefPtr<WebSocket> create(DOM::Window& window, URL& url)
static NonnullRefPtr<WebSocket> create(DOM::Window& window, AK::URL& url)
{
return adopt_ref(*new WebSocket(window, url));
}
@ -102,11 +102,11 @@ private:
void on_error();
void on_close(u16 code, String reason, bool was_clean);
explicit WebSocket(DOM::Window&, URL&);
explicit WebSocket(DOM::Window&, AK::URL&);
NonnullRefPtr<DOM::Window> m_window;
URL m_url;
AK::URL m_url;
String m_binary_type { "blob" };
RefPtr<Protocol::WebSocket> m_websocket;
};