diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-05-17 12:37:31 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-17 19:47:05 +0200 |
commit | 6970f1b6c15073e2386362a817b8c7bf25a73827 (patch) | |
tree | 95d2e93e0b6f2510e932463fc4e5b8d0ea5d3c48 /Ladybird/Tab.h | |
parent | c113d780c6a587c0698c94c032d0de02aa524847 (diff) | |
download | serenity-6970f1b6c15073e2386362a817b8c7bf25a73827.zip |
Browser+Ladybird+LibWebView: Handle trivial content APIs in LibWebView
The goal here is to reduce the amount of WebContent client APIs that are
duplicated across every ViewImplementation. Across our three browsers,
we currently:
Ladybird - Mix some AK::Function callbacks and Qt signals to notify
tabs of WebContent events.
Browser - Use only AK::Function callbacks.
headless-browser - Drop most events on the floor.
Instead, let's only use AK::Function callbacks across all three browsers
to propagate events to tabs. This allows us to invoke those callbacks
directly from LibWebView instead of all three browsers needing to define
a trivial `if (callback) callback();` override of a LibWebView virtual
function. For headless-browser, we can simply not set these callbacks.
As a first pass, this only converts WebContent events that are trivial
to this approach. That is, events that were simply passed onto the tab
or handled without much fuss.
Diffstat (limited to 'Ladybird/Tab.h')
-rw-r--r-- | Ladybird/Tab.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Ladybird/Tab.h b/Ladybird/Tab.h index 6e85221153..c05e10bb5d 100644 --- a/Ladybird/Tab.h +++ b/Ladybird/Tab.h @@ -37,6 +37,9 @@ public: HistoryNavigation, }; void navigate(QString, LoadType = LoadType::Normal); + void back(); + void forward(); + void reload(); void debug_request(DeprecatedString const& request, DeprecatedString const& argument); @@ -54,11 +57,6 @@ public: public slots: void focus_location_editor(); void location_edit_return_pressed(); - void page_title_changed(QString); - void page_favicon_changed(QIcon); - void back(); - void forward(); - void reload(); signals: void title_changed(int id, QString); |