mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWebView: Create a spare WebContent process
Since cross-site navigation is a pretty frequent task, creating a spare process is commonplace in other browsers to reduce the overhead of directing the target site to a new process. We store this process on the WebView application. If it is unavailable, we queue a task to create it later.
This commit is contained in:
parent
5810c8073e
commit
aca4385daf
Notes:
github-actions[bot]
2025-03-11 11:11:42 +00:00
Author: https://github.com/trflynn89
Commit: aca4385daf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3882
Reviewed-by: https://github.com/gmta ✅
8 changed files with 98 additions and 9 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <LibWeb/HTML/SelectItem.h>
|
||||
#include <LibWeb/HTML/WebViewHints.h>
|
||||
#include <LibWeb/Page/EventResult.h>
|
||||
#include <LibWebView/Forward.h>
|
||||
#include <WebContent/WebContentClientEndpoint.h>
|
||||
#include <WebContent/WebContentServerEndpoint.h>
|
||||
|
||||
|
@ -38,14 +39,17 @@ public:
|
|||
|
||||
static size_t client_count() { return s_clients.size(); }
|
||||
|
||||
explicit WebContentClient(IPC::Transport);
|
||||
WebContentClient(IPC::Transport, ViewImplementation&);
|
||||
~WebContentClient();
|
||||
|
||||
void assign_view(Badge<Application>, ViewImplementation&);
|
||||
void register_view(u64 page_id, ViewImplementation&);
|
||||
void unregister_view(u64 page_id);
|
||||
|
||||
Function<void()> on_web_content_process_crash;
|
||||
|
||||
pid_t pid() const { return m_process_handle.pid; }
|
||||
void set_pid(pid_t pid) { m_process_handle.pid = pid; }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue