mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibWebView+UI: Add an Application method to open a URL in a new tab
This lets us avoid each UI needing to handle link clicks directly, and lets actions stored in LibWebView avoid awkwardly going through the link click callbacks to open URLs.
This commit is contained in:
parent
c2365653a5
commit
ce331cbcd5
Notes:
github-actions[bot]
2025-09-18 11:28:58 +00:00
Author: https://github.com/trflynn89
Commit: ce331cbcd5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6221
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/konradekk
20 changed files with 62 additions and 170 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||
#include <LibWeb/CSS/PreferredContrast.h>
|
||||
#include <LibWeb/CSS/PreferredMotion.h>
|
||||
#include <LibWeb/HTML/ActivateTab.h>
|
||||
#include <LibWebView/Forward.h>
|
||||
#include <LibWebView/Options.h>
|
||||
#include <LibWebView/Process.h>
|
||||
|
@ -56,7 +57,10 @@ public:
|
|||
static ProcessManager& process_manager() { return *the().m_process_manager; }
|
||||
|
||||
ErrorOr<NonnullRefPtr<WebContentClient>> launch_web_content_process(ViewImplementation&);
|
||||
|
||||
virtual Optional<ViewImplementation&> active_web_view() const { return {}; }
|
||||
virtual Optional<ViewImplementation&> open_blank_new_tab(Web::HTML::ActivateTab) const { return {}; }
|
||||
void open_url_in_new_tab(URL::URL const&, Web::HTML::ActivateTab) const;
|
||||
|
||||
void add_child_process(Process&&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue