LibWebView+UI: Move clipboard handling from the WebView to the App

Clipboard handling largely has nothing to do with the individual web
views. Rather, we interact with the system clipboard at the application
level. So let's move these implementations to the Application.
This commit is contained in:
Timothy Flynn 2025-09-18 08:16:36 -04:00 committed by Tim Flynn
parent 4f31e492e7
commit ca082d6d73
Notes: github-actions[bot] 2025-09-19 10:39:59 +00:00
15 changed files with 131 additions and 145 deletions

View file

@ -21,6 +21,7 @@
#include <LibWeb/CSS/PreferredColorScheme.h>
#include <LibWeb/CSS/PreferredContrast.h>
#include <LibWeb/CSS/PreferredMotion.h>
#include <LibWeb/Clipboard/SystemClipboard.h>
#include <LibWeb/HTML/ActivateTab.h>
#include <LibWebView/Forward.h>
#include <LibWebView/Options.h>
@ -75,6 +76,10 @@ public:
virtual void display_download_confirmation_dialog(StringView download_name, LexicalPath const& path) const;
virtual void display_error_dialog(StringView error_message) const;
virtual String clipboard_text() const { return {}; }
virtual Vector<Web::Clipboard::SystemClipboardRepresentation> clipboard_entries() const { return {}; }
virtual void insert_clipboard_entry(Web::Clipboard::SystemClipboardRepresentation) { }
Action& reload_action() { return *m_reload_action; }
Action& copy_selection_action() { return *m_copy_selection_action; }
Action& paste_action() { return *m_paste_action; }