mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWebView+UI: Move ownership of application services to LibWebView
LibWebView now knows how to launch RequestServer and ImageDecoderServer without help from the UI, so let's move ownership of these services over to LibWebView for de-duplication.
This commit is contained in:
parent
1b38ebcc7f
commit
bb7dff7dfe
Notes:
github-actions[bot]
2024-11-14 10:48:40 +00:00
Author: https://github.com/trflynn89
Commit: bb7dff7dfe
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2327
17 changed files with 99 additions and 188 deletions
|
@ -9,10 +9,7 @@
|
|||
#include <AK/ByteString.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibImageDecoderClient/Client.h>
|
||||
#include <LibRequests/RequestClient.h>
|
||||
#include <LibWeb/PixelUnits.h>
|
||||
#include <LibWebView/Application.h>
|
||||
|
||||
|
@ -34,12 +31,8 @@ public:
|
|||
virtual void create_platform_arguments(Core::ArgsParser&) override;
|
||||
virtual void create_platform_options(WebView::ChromeOptions&, WebView::WebContentOptions&) override;
|
||||
|
||||
ErrorOr<void> launch_services();
|
||||
ErrorOr<void> launch_test_fixtures();
|
||||
|
||||
static Requests::RequestClient& request_client() { return *the().m_request_client; }
|
||||
static ImageDecoderClient::Client& image_decoder_client() { return *the().m_image_decoder_client; }
|
||||
|
||||
HeadlessWebView& create_web_view(Core::AnonymousBuffer theme, Web::DevicePixelSize window_size);
|
||||
HeadlessWebView& create_child_web_view(HeadlessWebView const&, u64 page_index);
|
||||
void destroy_web_views();
|
||||
|
@ -70,9 +63,6 @@ public:
|
|||
int height { 600 };
|
||||
|
||||
private:
|
||||
RefPtr<Requests::RequestClient> m_request_client;
|
||||
RefPtr<ImageDecoderClient::Client> m_image_decoder_client;
|
||||
|
||||
Vector<NonnullOwnPtr<HeadlessWebView>> m_web_views;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue