mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:17:34 +00:00
WebContent: Add IPC call to set window handle from WebContent client
This commit is contained in:
parent
48e0789a17
commit
6d91d2fa50
4 changed files with 8 additions and 0 deletions
|
@ -268,6 +268,7 @@ public:
|
||||||
Optional<AK::URL> const& creator_url() const { return m_creator_url; }
|
Optional<AK::URL> const& creator_url() const { return m_creator_url; }
|
||||||
|
|
||||||
String const& window_handle() const { return m_window_handle; }
|
String const& window_handle() const { return m_window_handle; }
|
||||||
|
void set_window_handle(String handle) { m_window_handle = move(handle); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);
|
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);
|
||||||
|
|
|
@ -66,6 +66,11 @@ Messages::WebContentServer::GetWindowHandleResponse ConnectionFromClient::get_wi
|
||||||
return m_page_host->page().top_level_browsing_context().window_handle();
|
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)
|
void ConnectionFromClient::connect_to_webdriver(DeprecatedString const& webdriver_ipc_path)
|
||||||
{
|
{
|
||||||
// FIXME: Propagate this error back to the browser.
|
// FIXME: Propagate this error back to the browser.
|
||||||
|
|
|
@ -49,6 +49,7 @@ private:
|
||||||
Web::Page const& page() const;
|
Web::Page const& page() const;
|
||||||
|
|
||||||
virtual Messages::WebContentServer::GetWindowHandleResponse get_window_handle() override;
|
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 connect_to_webdriver(DeprecatedString const& webdriver_ipc_path) override;
|
||||||
virtual void update_system_theme(Core::AnonymousBuffer const&) override;
|
virtual void update_system_theme(Core::AnonymousBuffer const&) override;
|
||||||
virtual void update_system_fonts(DeprecatedString const&, DeprecatedString const&, DeprecatedString const&) override;
|
virtual void update_system_fonts(DeprecatedString const&, DeprecatedString const&, DeprecatedString const&) override;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
endpoint WebContentServer
|
endpoint WebContentServer
|
||||||
{
|
{
|
||||||
get_window_handle() => (String handle)
|
get_window_handle() => (String handle)
|
||||||
|
set_window_handle(String handle) =|
|
||||||
|
|
||||||
connect_to_webdriver(DeprecatedString webdriver_ipc_path) =|
|
connect_to_webdriver(DeprecatedString webdriver_ipc_path) =|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue