mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 17:27:35 +00:00
LibWeb: Add a shared WebViewHooks base class for both web view widgets
This will make it easier for Browser to share code between both views.
This commit is contained in:
parent
7a7e39c7af
commit
49b9a0a665
5 changed files with 60 additions and 21 deletions
|
@ -30,11 +30,13 @@
|
|||
#include <LibGUI/ScrollableWidget.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Page.h>
|
||||
#include <LibWeb/WebViewHooks.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
class PageView final
|
||||
: public GUI::ScrollableWidget
|
||||
, public WebViewHooks
|
||||
, public PageClient {
|
||||
C_OBJECT(PageView);
|
||||
|
||||
|
@ -59,17 +61,6 @@ public:
|
|||
|
||||
void set_should_show_line_box_borders(bool value) { m_should_show_line_box_borders = value; }
|
||||
|
||||
Function<void(const Gfx::IntPoint& screen_position)> on_context_menu_request;
|
||||
Function<void(const URL&, const String& target, unsigned modifiers)> on_link_click;
|
||||
Function<void(const URL&, const Gfx::IntPoint& screen_position)> on_link_context_menu_request;
|
||||
Function<void(const URL&)> on_link_middle_click;
|
||||
Function<void(const URL&)> on_link_hover;
|
||||
Function<void(const String&)> on_title_change;
|
||||
Function<void(const URL&)> on_load_start;
|
||||
Function<void(const Gfx::Bitmap&)> on_favicon_change;
|
||||
Function<void(const URL&)> on_url_drop;
|
||||
Function<void(Document*)> on_set_document;
|
||||
|
||||
virtual bool accepts_focus() const override { return true; }
|
||||
|
||||
GUI::Action& select_all_action() { return *m_select_all_action; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue