diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-03-20 18:39:20 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-21 09:39:49 +0000 |
commit | e6fc35897f1daf67074bb823193301713f011189 (patch) | |
tree | 33d2d6b5b975fdfc0b0a8886438cd173aea65790 /Ladybird/WebContentView.cpp | |
parent | 78ed798852117a7e129de057b585dc5b642b40ee (diff) | |
download | serenity-e6fc35897f1daf67074bb823193301713f011189.zip |
WebContent+Everywhere: Add an option to not activate new tabs over IPC
WebDriver, for example, will want to create new tabs without activating
them.
Diffstat (limited to 'Ladybird/WebContentView.cpp')
-rw-r--r-- | Ladybird/WebContentView.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Ladybird/WebContentView.cpp b/Ladybird/WebContentView.cpp index 7214476531..f4f4ed5c2e 100644 --- a/Ladybird/WebContentView.cpp +++ b/Ladybird/WebContentView.cpp @@ -970,25 +970,24 @@ void WebContentView::notify_server_did_set_cookie(Badge<WebContentClient>, AK::U on_set_cookie(url, cookie, source); } +void WebContentView::notify_server_did_update_cookie(Badge<WebContentClient>, Web::Cookie::Cookie const& cookie) +{ + if (on_update_cookie) + on_update_cookie(cookie); +} + void WebContentView::notify_server_did_close_browsing_context(Badge<WebContentClient>) { emit close(); } -String WebContentView::notify_request_open_new_tab(Badge<WebContentClient>) +String WebContentView::notify_server_did_request_new_tab(Badge<WebContentClient>, Web::HTML::ActivateTab activate_tab) { if (on_new_tab) - return on_new_tab(); - + return on_new_tab(activate_tab); return {}; } -void WebContentView::notify_server_did_update_cookie(Badge<WebContentClient>, Web::Cookie::Cookie const& cookie) -{ - if (on_update_cookie) - on_update_cookie(cookie); -} - void WebContentView::notify_server_did_update_resource_count(i32 count_waiting) { // FIXME |