LibWebView+UI: Handle common WebView client initialization in LibWebView

No need to have every UI manually implement these common steps.
This commit is contained in:
Timothy Flynn 2024-11-13 16:35:17 -05:00 committed by Andreas Kling
commit 4e1dab477a
Notes: github-actions[bot] 2024-11-14 10:48:24 +00:00
6 changed files with 47 additions and 97 deletions

View file

@ -230,6 +230,7 @@ public:
Function<void(size_t, Gfx::IntPoint)> on_inspector_requested_cookie_context_menu;
Function<void(String const&)> on_inspector_executed_console_script;
Function<void(String const&)> on_inspector_exported_inspector_html;
Function<void()> on_web_content_crashed;
virtual Web::DevicePixelSize viewport_size() const = 0;
virtual Gfx::IntPoint to_content_position(Gfx::IntPoint widget_position) const = 0;
@ -253,7 +254,7 @@ protected:
No,
Yes,
};
virtual void initialize_client(CreateNewClient = CreateNewClient::Yes) { }
virtual void initialize_client(CreateNewClient = CreateNewClient::Yes);
enum class LoadErrorPage {
No,