1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

WebContent+Everywhere: Add an option to not activate new tabs over IPC

WebDriver, for example, will want to create new tabs without activating
them.
This commit is contained in:
Timothy Flynn 2023-03-20 18:39:20 -04:00 committed by Linus Groh
parent 78ed798852
commit e6fc35897f
21 changed files with 81 additions and 62 deletions

View file

@ -59,14 +59,6 @@ void OutOfProcessWebView::handle_web_content_process_crash()
load_html(builder.to_deprecated_string(), m_url);
}
String OutOfProcessWebView::notify_request_open_new_tab(Badge<WebContentClient>)
{
if (on_new_tab)
return on_new_tab();
return {};
}
void OutOfProcessWebView::create_client()
{
m_client_state = {};
@ -475,18 +467,25 @@ void OutOfProcessWebView::notify_server_did_set_cookie(Badge<WebContentClient>,
on_set_cookie(url, cookie, source);
}
void OutOfProcessWebView::notify_server_did_close_browsing_context(Badge<WebContentClient>)
{
if (on_close)
on_close();
}
void OutOfProcessWebView::notify_server_did_update_cookie(Badge<WebContentClient>, Web::Cookie::Cookie const& cookie)
{
if (on_update_cookie)
on_update_cookie(cookie);
}
String OutOfProcessWebView::notify_server_did_request_new_tab(Badge<WebContentClient>, Web::HTML::ActivateTab activate_tab)
{
if (on_new_tab)
return on_new_tab(activate_tab);
return {};
}
void OutOfProcessWebView::notify_server_did_close_browsing_context(Badge<WebContentClient>)
{
if (on_close)
on_close();
}
void OutOfProcessWebView::notify_server_did_update_resource_count(i32 count_waiting)
{
if (on_resource_status_change)