mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibWeb+Browser: Remove Web::WebViewHooks class
This was a mixin class that allowed sharing a set of hooks between InProcessWebView and OutOfProcessWebView. Now that there is only OOPWV, we don't need the mixin.
This commit is contained in:
parent
59e8dedea2
commit
06d97c892b
5 changed files with 66 additions and 100 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -11,15 +11,12 @@
|
|||
#include <LibGUI/Widget.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/WebViewHooks.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
class WebContentClient;
|
||||
|
||||
class OutOfProcessWebView final
|
||||
: public GUI::AbstractScrollableWidget
|
||||
, public Web::WebViewHooks {
|
||||
class OutOfProcessWebView final : public GUI::AbstractScrollableWidget {
|
||||
C_OBJECT(OutOfProcessWebView);
|
||||
|
||||
public:
|
||||
|
@ -60,6 +57,27 @@ public:
|
|||
void set_content_filters(Vector<String>);
|
||||
void set_preferred_color_scheme(Web::CSS::PreferredColorScheme);
|
||||
|
||||
Function<void(Gfx::IntPoint const& screen_position)> on_context_menu_request;
|
||||
Function<void(const AK::URL&, String const& target, unsigned modifiers)> on_link_click;
|
||||
Function<void(const AK::URL&, Gfx::IntPoint const& screen_position)> on_link_context_menu_request;
|
||||
Function<void(const AK::URL&, Gfx::IntPoint const& screen_position, Gfx::ShareableBitmap const&)> on_image_context_menu_request;
|
||||
Function<void(const AK::URL&, String const& target, unsigned modifiers)> on_link_middle_click;
|
||||
Function<void(const AK::URL&)> on_link_hover;
|
||||
Function<void(String const&)> on_title_change;
|
||||
Function<void(const AK::URL&)> on_load_start;
|
||||
Function<void(const AK::URL&)> on_load_finish;
|
||||
Function<void(Gfx::Bitmap const&)> on_favicon_change;
|
||||
Function<void(const AK::URL&)> on_url_drop;
|
||||
Function<void(DOM::Document*)> on_set_document;
|
||||
Function<void(const AK::URL&, String const&)> on_get_source;
|
||||
Function<void(String const&)> on_get_dom_tree;
|
||||
Function<void(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties, String const& node_box_sizing)> on_get_dom_node_properties;
|
||||
Function<void(i32 message_id)> on_js_console_new_message;
|
||||
Function<void(i32 start_index, Vector<String> const& message_types, Vector<String> const& messages)> on_get_js_console_messages;
|
||||
Function<String(const AK::URL& url, Cookie::Source source)> on_get_cookie;
|
||||
Function<void(const AK::URL& url, Cookie::ParsedCookie const& cookie, Cookie::Source source)> on_set_cookie;
|
||||
Function<void(i32 count_waiting)> on_resource_status_change;
|
||||
|
||||
void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize const& content_size);
|
||||
void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id);
|
||||
void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue