LibWebView+UI: Pass RequestServerOptions to Application implementations

This will be needed by test-web.
This commit is contained in:
Timothy Flynn 2025-11-12 10:52:16 -05:00 committed by Jelle Raaijmakers
parent 0020af37cd
commit a853bb43ef
Notes: github-actions[bot] 2025-11-20 08:35:49 +00:00
6 changed files with 6 additions and 6 deletions

View file

@ -283,7 +283,7 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
.default_time_zone = default_time_zone,
};
create_platform_options(m_browser_options, m_web_content_options);
create_platform_options(m_browser_options, m_request_server_options, m_web_content_options);
initialize_actions();
m_event_loop = create_platform_event_loop();

View file

@ -139,7 +139,7 @@ protected:
virtual void process_did_exit(Process&&);
virtual void create_platform_arguments(Core::ArgsParser&) { }
virtual void create_platform_options(BrowserOptions&, WebContentOptions&) { }
virtual void create_platform_options(BrowserOptions&, RequestServerOptions&, WebContentOptions&) { }
virtual NonnullOwnPtr<Core::EventLoop> create_platform_event_loop();
virtual Optional<ByteString> ask_user_for_download_folder() const { return {}; }

View file

@ -57,7 +57,7 @@ void Application::create_platform_arguments(Core::ArgsParser& args_parser)
});
}
void Application::create_platform_options(WebView::BrowserOptions& browser_options, WebView::WebContentOptions& web_content_options)
void Application::create_platform_options(WebView::BrowserOptions& browser_options, WebView::RequestServerOptions&, WebView::WebContentOptions& web_content_options)
{
browser_options.headless_mode = WebView::HeadlessMode::Test;
browser_options.disable_sql_database = WebView::DisableSQLDatabase::Yes;

View file

@ -21,7 +21,7 @@ public:
~Application();
virtual void create_platform_arguments(Core::ArgsParser&) override;
virtual void create_platform_options(WebView::BrowserOptions&, WebView::WebContentOptions&) override;
virtual void create_platform_options(WebView::BrowserOptions&, WebView::RequestServerOptions&, WebView::WebContentOptions&) override;
ErrorOr<void> launch_test_fixtures();

View file

@ -94,7 +94,7 @@ public:
Application::Application() = default;
Application::~Application() = default;
void Application::create_platform_options(WebView::BrowserOptions&, WebView::WebContentOptions& web_content_options)
void Application::create_platform_options(WebView::BrowserOptions&, WebView::RequestServerOptions&, WebView::WebContentOptions& web_content_options)
{
web_content_options.config_path = Settings::the()->directory();
}

View file

@ -33,7 +33,7 @@ public:
private:
explicit Application();
virtual void create_platform_options(WebView::BrowserOptions&, WebView::WebContentOptions&) override;
virtual void create_platform_options(WebView::BrowserOptions&, WebView::RequestServerOptions&, WebView::WebContentOptions&) override;
virtual NonnullOwnPtr<Core::EventLoop> create_platform_event_loop() override;
virtual Optional<WebView::ViewImplementation&> active_web_view() const override;