summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent/WebDriverConnection.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-11-09 09:56:20 -0500
committerLinus Groh <mail@linusgroh.de>2022-11-09 19:59:26 +0000
commitb57d7e43326437d143708dd18025533cd8b0d8c6 (patch)
tree9d1997d968a3bedadd25c727ded423a06bf3cb54 /Userland/Services/WebContent/WebDriverConnection.h
parent9505928fdbd9fd15a201f0371f475c9851a67b83 (diff)
downloadserenity-b57d7e43326437d143708dd18025533cd8b0d8c6.zip
Browser+WebContent+WebDriver: Move Get/Set Window Rect to WebContent
This also lets us more fully implement the "restore the window" method, which requires we block until the document reaches the "visible" state.
Diffstat (limited to 'Userland/Services/WebContent/WebDriverConnection.h')
-rw-r--r--Userland/Services/WebContent/WebDriverConnection.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Services/WebContent/WebDriverConnection.h b/Userland/Services/WebContent/WebDriverConnection.h
index 9fec3b2638..2d84e37be1 100644
--- a/Userland/Services/WebContent/WebDriverConnection.h
+++ b/Userland/Services/WebContent/WebDriverConnection.h
@@ -21,11 +21,11 @@ class WebDriverConnection final
C_OBJECT_ABSTRACT(WebDriverConnection)
public:
- static ErrorOr<NonnullRefPtr<WebDriverConnection>> connect(PageHost& page_host, String const& webdriver_ipc_path);
+ static ErrorOr<NonnullRefPtr<WebDriverConnection>> connect(ConnectionFromClient& web_content_client, PageHost& page_host, String const& webdriver_ipc_path);
virtual ~WebDriverConnection() = default;
private:
- WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, PageHost& page_host);
+ WebDriverConnection(NonnullOwnPtr<Core::Stream::LocalSocket> socket, ConnectionFromClient& web_content_client, PageHost& page_host);
virtual void die() override { }
@@ -33,9 +33,13 @@ private:
virtual void set_is_webdriver_active(bool) override;
virtual Messages::WebDriverClient::NavigateToResponse navigate_to(JsonValue const& payload) override;
virtual Messages::WebDriverClient::GetCurrentUrlResponse get_current_url() override;
+ virtual Messages::WebDriverClient::GetWindowRectResponse get_window_rect() override;
+ virtual Messages::WebDriverClient::SetWindowRectResponse set_window_rect(JsonValue const& payload) override;
ErrorOr<void, Web::WebDriver::Error> ensure_open_top_level_browsing_context();
+ void restore_the_window();
+ ConnectionFromClient& m_web_content_client;
PageHost& m_page_host;
};