LibWebView+UI: Extract some UI-specific displays to Application helpers

This is preparation for moving application menus to LibWebView. We will
need a way to display these dialogs from outside of the UI layer.
This commit is contained in:
Timothy Flynn 2025-09-04 08:53:57 -04:00 committed by Tim Flynn
parent 95dca6c787
commit 2632b1375b
Notes: github-actions[bot] 2025-09-11 18:25:30 +00:00
10 changed files with 134 additions and 54 deletions

View file

@ -599,6 +599,16 @@ ErrorOr<LexicalPath> Application::path_for_downloaded_file(StringView file) cons
return LexicalPath::join(downloads_directory, file);
}
void Application::display_download_confirmation_dialog(StringView download_name, LexicalPath const& path) const
{
outln("{} saved to: {}", download_name, path);
}
void Application::display_error_dialog(StringView error_message) const
{
warnln("{}", error_message);
}
ErrorOr<Application::DevtoolsState> Application::toggle_devtools_enabled()
{
if (m_devtools) {