diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-03-16 17:36:36 +0300 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-03-16 13:17:37 -0400 |
commit | 6d91d2fa507b5c698d893abed622ab61a1a2b1c6 (patch) | |
tree | 7f29f289f5ba773a7b0c957f43768ded38ed4a2c /Userland/Services | |
parent | 48e0789a17ee93873207b304f450330ec0d644f8 (diff) | |
download | serenity-6d91d2fa507b5c698d893abed622ab61a1a2b1c6.zip |
WebContent: Add IPC call to set window handle from WebContent client
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.cpp | 5 | ||||
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.h | 1 | ||||
-rw-r--r-- | Userland/Services/WebContent/WebContentServer.ipc | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index e321205b7b..a39e99a3d9 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -66,6 +66,11 @@ Messages::WebContentServer::GetWindowHandleResponse ConnectionFromClient::get_wi return m_page_host->page().top_level_browsing_context().window_handle(); } +void ConnectionFromClient::set_window_handle(String const& handle) +{ + m_page_host->page().top_level_browsing_context().set_window_handle(handle); +} + void ConnectionFromClient::connect_to_webdriver(DeprecatedString const& webdriver_ipc_path) { // FIXME: Propagate this error back to the browser. diff --git a/Userland/Services/WebContent/ConnectionFromClient.h b/Userland/Services/WebContent/ConnectionFromClient.h index e9124dd3ee..57d5c92404 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.h +++ b/Userland/Services/WebContent/ConnectionFromClient.h @@ -49,6 +49,7 @@ private: Web::Page const& page() const; virtual Messages::WebContentServer::GetWindowHandleResponse get_window_handle() override; + virtual void set_window_handle(String const& handle) override; virtual void connect_to_webdriver(DeprecatedString const& webdriver_ipc_path) override; virtual void update_system_theme(Core::AnonymousBuffer const&) override; virtual void update_system_fonts(DeprecatedString const&, DeprecatedString const&, DeprecatedString const&) override; diff --git a/Userland/Services/WebContent/WebContentServer.ipc b/Userland/Services/WebContent/WebContentServer.ipc index 85cf2aead5..a6b534b973 100644 --- a/Userland/Services/WebContent/WebContentServer.ipc +++ b/Userland/Services/WebContent/WebContentServer.ipc @@ -10,6 +10,7 @@ endpoint WebContentServer { get_window_handle() => (String handle) + set_window_handle(String handle) =| connect_to_webdriver(DeprecatedString webdriver_ipc_path) =| |