1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 00:57:44 +00:00

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.
This commit is contained in:
Timothy Flynn 2023-05-17 12:37:31 -04:00 committed by Andreas Kling
parent c113d780c6
commit 6970f1b6c1
10 changed files with 236 additions and 799 deletions

View file

@ -97,36 +97,33 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::
update_reset_zoom_button();
});
QObject::connect(m_view, &WebContentView::link_unhovered, [this] {
m_hover_label->hide();
});
QObject::connect(m_view, &WebContentView::activate_tab, [this] {
view().on_activate_tab = [this] {
m_window->activate_tab(tab_index());
});
};
QObject::connect(m_view, &WebContentView::close, [this] {
view().on_close = [this] {
m_window->close_tab(tab_index());
});
};
QObject::connect(m_view, &WebContentView::link_hovered, [this](QString const& title) {
m_hover_label->setText(title);
view().on_link_hover = [this](auto const& url) {
m_hover_label->setText(qstring_from_ak_deprecated_string(url.to_deprecated_string()));
update_hover_label();
m_hover_label->show();
});
QObject::connect(m_view, &WebContentView::link_unhovered, [this] {
};
view().on_link_unhover = [this]() {
m_hover_label->hide();
});
};
QObject::connect(m_view, &WebContentView::back_mouse_button, [this] {
view().on_back_button = [this] {
back();
});
};
QObject::connect(m_view, &WebContentView::forward_mouse_button, [this] {
view().on_forward_button = [this] {
forward();
});
};
QObject::connect(m_view, &WebContentView::load_started, [this](const URL& url, bool is_redirect) {
view().on_load_start = [this](const URL& url, bool is_redirect) {
// If we are loading due to a redirect, we replace the current history entry
// with the loaded URL
if (is_redirect) {
@ -150,7 +147,7 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::
if (m_console_widget)
m_console_widget->reset();
});
};
view().on_load_finish = [this](auto&) {
if (m_inspector_widget != nullptr && m_inspector_widget->isVisible()) {
@ -160,45 +157,76 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::
};
QObject::connect(m_location_edit, &QLineEdit::returnPressed, this, &Tab::location_edit_return_pressed);
QObject::connect(m_view, &WebContentView::title_changed, this, &Tab::page_title_changed);
QObject::connect(m_view, &WebContentView::favicon_changed, this, &Tab::page_favicon_changed);
view().on_title_change = [this](auto const& title) {
m_title = qstring_from_ak_deprecated_string(title);
m_history.update_title(title);
emit title_changed(tab_index(), m_title);
};
view().on_favicon_change = [this](auto const& bitmap) {
auto qimage = QImage(bitmap.scanline_u8(0), bitmap.width(), bitmap.height(), QImage::Format_ARGB32);
if (qimage.isNull())
return;
auto qpixmap = QPixmap::fromImage(qimage);
if (qpixmap.isNull())
return;
emit favicon_changed(tab_index(), QIcon(qpixmap));
};
QObject::connect(focus_location_editor_action, &QAction::triggered, this, &Tab::focus_location_editor);
QObject::connect(m_view, &WebContentView::got_source, this, [this](AK::URL, QString const& source) {
view().on_get_source = [this](auto const& url, auto const& source) {
auto* text_edit = new QPlainTextEdit(this);
text_edit->setWindowFlags(Qt::Window);
text_edit->setFont(QFontDatabase::systemFont(QFontDatabase::SystemFont::FixedFont));
text_edit->resize(800, 600);
text_edit->setPlainText(source);
text_edit->setWindowTitle(qstring_from_ak_deprecated_string(url.to_deprecated_string()));
text_edit->setPlainText(qstring_from_ak_deprecated_string(source));
text_edit->show();
});
};
QObject::connect(m_view, &WebContentView::navigate_back, this, &Tab::back);
QObject::connect(m_view, &WebContentView::navigate_forward, this, &Tab::forward);
QObject::connect(m_view, &WebContentView::refresh, this, &Tab::reload);
QObject::connect(m_view, &WebContentView::restore_window, this, [this]() {
view().on_navigate_back = [this]() {
back();
};
view().on_navigate_forward = [this]() {
forward();
};
view().on_refresh = [this]() {
reload();
};
view().on_restore_window = [this]() {
m_window->showNormal();
});
QObject::connect(m_view, &WebContentView::reposition_window, this, [this](auto const& position) {
};
view().on_reposition_window = [this](auto const& position) {
m_window->move(position.x(), position.y());
return Gfx::IntPoint { m_window->x(), m_window->y() };
});
QObject::connect(m_view, &WebContentView::resize_window, this, [this](auto const& size) {
};
view().on_resize_window = [this](auto const& size) {
m_window->resize(size.width(), size.height());
return Gfx::IntSize { m_window->width(), m_window->height() };
});
QObject::connect(m_view, &WebContentView::maximize_window, this, [this]() {
};
view().on_maximize_window = [this]() {
m_window->showMaximized();
return Gfx::IntRect { m_window->x(), m_window->y(), m_window->width(), m_window->height() };
});
QObject::connect(m_view, &WebContentView::minimize_window, this, [this]() {
};
view().on_minimize_window = [this]() {
m_window->showMinimized();
return Gfx::IntRect { m_window->x(), m_window->y(), m_window->width(), m_window->height() };
});
QObject::connect(m_view, &WebContentView::fullscreen_window, this, [this]() {
};
view().on_fullscreen_window = [this]() {
m_window->showFullScreen();
return Gfx::IntRect { m_window->x(), m_window->y(), m_window->width(), m_window->height() };
});
};
view().on_get_dom_tree = [this](auto& dom_tree) {
if (m_inspector_widget)
@ -492,18 +520,6 @@ void Tab::location_edit_return_pressed()
navigate(m_location_edit->text());
}
void Tab::page_title_changed(QString title)
{
m_title = title;
m_history.update_title(ak_deprecated_string_from_qstring(m_title));
emit title_changed(tab_index(), std::move(title));
}
void Tab::page_favicon_changed(QIcon icon)
{
emit favicon_changed(tab_index(), std::move(icon));
}
int Tab::tab_index()
{
return m_window->tab_index(this);

View file

@ -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);

View file

@ -16,7 +16,6 @@
#include <AK/NonnullOwnPtr.h>
#include <AK/StringBuilder.h>
#include <AK/Types.h>
#include <Browser/CookieJar.h>
#include <Kernel/API/KeyCode.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
@ -292,9 +291,11 @@ void WebContentView::mouseReleaseEvent(QMouseEvent* event)
auto button = get_button_from_qt_event(*event);
if (event->button() & Qt::MouseButton::BackButton) {
emit back_mouse_button();
if (on_back_button)
on_back_button();
} else if (event->button() & Qt::MouseButton::ForwardButton) {
emit forward_mouse_button();
if (on_forward_button)
on_forward_button();
}
if (button == 0) {
@ -640,11 +641,6 @@ void WebContentView::notify_server_did_layout(Badge<WebContentClient>, Gfx::IntS
horizontalScrollBar()->setPageStep(m_viewport_rect.width());
}
void WebContentView::notify_server_did_change_title(Badge<WebContentClient>, DeprecatedString const& title)
{
emit title_changed(qstring_from_ak_deprecated_string(title));
}
void WebContentView::notify_server_did_request_scroll(Badge<WebContentClient>, i32 x_delta, i32 y_delta)
{
horizontalScrollBar()->setValue(max(0, horizontalScrollBar()->value() + x_delta));
@ -683,82 +679,6 @@ void WebContentView::notify_server_did_leave_tooltip_area(Badge<WebContentClient
QToolTip::hideText();
}
void WebContentView::notify_server_did_hover_link(Badge<WebContentClient>, AK::URL const& url)
{
emit link_hovered(qstring_from_ak_deprecated_string(url.to_deprecated_string()));
}
void WebContentView::notify_server_did_unhover_link(Badge<WebContentClient>)
{
emit link_unhovered();
}
void WebContentView::notify_server_did_click_link(Badge<WebContentClient>, AK::URL const& url, DeprecatedString const& target, unsigned int modifiers)
{
if (on_link_click) {
on_link_click(url, target, modifiers);
}
}
void WebContentView::notify_server_did_middle_click_link(Badge<WebContentClient>, AK::URL const& url, DeprecatedString const& target, unsigned int modifiers)
{
if (on_link_middle_click) {
on_link_middle_click(url, target, modifiers);
}
}
void WebContentView::notify_server_did_start_loading(Badge<WebContentClient>, AK::URL const& url, bool is_redirect)
{
m_url = url;
emit load_started(url, is_redirect);
}
void WebContentView::notify_server_did_finish_loading(Badge<WebContentClient>, AK::URL const& url)
{
m_url = url;
if (on_load_finish)
on_load_finish(url);
}
void WebContentView::notify_server_did_request_navigate_back(Badge<WebContentClient>)
{
emit navigate_back();
}
void WebContentView::notify_server_did_request_navigate_forward(Badge<WebContentClient>)
{
emit navigate_forward();
}
void WebContentView::notify_server_did_request_refresh(Badge<WebContentClient>)
{
emit refresh();
}
void WebContentView::notify_server_did_request_context_menu(Badge<WebContentClient>, Gfx::IntPoint content_position)
{
if (on_context_menu_request)
on_context_menu_request(to_widget_position(content_position));
}
void WebContentView::notify_server_did_request_link_context_menu(Badge<WebContentClient>, Gfx::IntPoint content_position, AK::URL const& url, DeprecatedString const&, unsigned)
{
if (on_link_context_menu_request)
on_link_context_menu_request(url, to_widget_position(content_position));
}
void WebContentView::notify_server_did_request_image_context_menu(Badge<WebContentClient>, Gfx::IntPoint content_position, AK::URL const& url, DeprecatedString const&, unsigned, Gfx::ShareableBitmap const& bitmap)
{
if (on_image_context_menu_request)
on_image_context_menu_request(url, to_widget_position(content_position), bitmap);
}
void WebContentView::notify_server_did_request_video_context_menu(Badge<WebContentClient>, Gfx::IntPoint content_position, AK::URL const& url, DeprecatedString const&, unsigned, bool is_playing, bool has_user_agent_controls, bool is_looping)
{
if (on_video_context_menu_request)
on_video_context_menu_request(url, to_widget_position(content_position), is_playing, has_user_agent_controls, is_looping);
}
void WebContentView::notify_server_did_request_alert(Badge<WebContentClient>, String const& message)
{
m_dialog = new QMessageBox(QMessageBox::Icon::Warning, "Ladybird", qstring_from_ak_string(message), QMessageBox::StandardButton::Ok, this);
@ -812,132 +732,6 @@ void WebContentView::notify_server_did_request_dismiss_dialog(Badge<WebContentCl
m_dialog->reject();
}
void WebContentView::notify_server_did_get_source(AK::URL const& url, DeprecatedString const& source)
{
emit got_source(url, qstring_from_ak_deprecated_string(source));
}
void WebContentView::notify_server_did_get_dom_tree(DeprecatedString const& dom_tree)
{
if (on_get_dom_tree)
on_get_dom_tree(dom_tree);
}
void WebContentView::notify_server_did_get_dom_node_properties(i32 node_id, DeprecatedString const& specified_style, DeprecatedString const& computed_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing)
{
if (on_get_dom_node_properties)
on_get_dom_node_properties(node_id, specified_style, computed_style, custom_properties, node_box_sizing);
}
void WebContentView::notify_server_did_output_js_console_message(i32 message_index)
{
if (on_js_console_new_message)
on_js_console_new_message(message_index);
}
void WebContentView::notify_server_did_get_js_console_messages(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages)
{
if (on_get_js_console_messages)
on_get_js_console_messages(start_index, message_types, messages);
}
void WebContentView::notify_server_did_change_favicon(Gfx::Bitmap const& bitmap)
{
auto qimage = QImage(bitmap.scanline_u8(0), bitmap.width(), bitmap.height(), QImage::Format_ARGB32);
if (qimage.isNull())
return;
auto qpixmap = QPixmap::fromImage(qimage);
if (qpixmap.isNull())
return;
emit favicon_changed(QIcon(qpixmap));
}
Vector<Web::Cookie::Cookie> WebContentView::notify_server_did_request_all_cookies(Badge<WebContentClient>, AK::URL const& url)
{
if (on_get_all_cookies)
return on_get_all_cookies(url);
return {};
}
Optional<Web::Cookie::Cookie> WebContentView::notify_server_did_request_named_cookie(Badge<WebContentClient>, AK::URL const& url, DeprecatedString const& name)
{
if (on_get_named_cookie)
return on_get_named_cookie(url, name);
return {};
}
DeprecatedString WebContentView::notify_server_did_request_cookie(Badge<WebContentClient>, AK::URL const& url, Web::Cookie::Source source)
{
if (on_get_cookie)
return on_get_cookie(url, source);
return {};
}
void WebContentView::notify_server_did_set_cookie(Badge<WebContentClient>, AK::URL const& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)
{
if (on_set_cookie)
on_set_cookie(url, cookie, source);
}
void WebContentView::notify_server_did_update_cookie(Badge<WebContentClient>, Web::Cookie::Cookie const& cookie)
{
if (on_update_cookie)
on_update_cookie(cookie);
}
void WebContentView::notify_server_did_close_browsing_context(Badge<WebContentClient>)
{
emit close();
}
String WebContentView::notify_server_did_request_new_tab(Badge<WebContentClient>, Web::HTML::ActivateTab activate_tab)
{
if (on_new_tab)
return on_new_tab(activate_tab);
return {};
}
void WebContentView::notify_server_did_request_activate_tab(Badge<WebContentClient>)
{
emit activate_tab();
}
void WebContentView::notify_server_did_update_resource_count(i32 count_waiting)
{
// FIXME
(void)count_waiting;
}
void WebContentView::notify_server_did_request_restore_window()
{
emit restore_window();
}
Gfx::IntPoint WebContentView::notify_server_did_request_reposition_window(Gfx::IntPoint position)
{
return emit reposition_window(position);
}
Gfx::IntSize WebContentView::notify_server_did_request_resize_window(Gfx::IntSize size)
{
return emit resize_window(size);
}
Gfx::IntRect WebContentView::notify_server_did_request_maximize_window()
{
return emit maximize_window();
}
Gfx::IntRect WebContentView::notify_server_did_request_minimize_window()
{
return emit minimize_window();
}
Gfx::IntRect WebContentView::notify_server_did_request_fullscreen_window()
{
return emit fullscreen_window();
}
void WebContentView::notify_server_did_request_file(Badge<WebContentClient>, DeprecatedString const& path, i32 request_id)
{
auto file = Core::File::open(path, Core::File::OpenMode::Read);
@ -992,12 +786,6 @@ void WebContentView::notify_server_did_finish_handling_input_event(bool event_wa
(void)event_was_accepted;
}
void WebContentView::notify_server_did_get_accessibility_tree(DeprecatedString const& accessibility_tree)
{
if (on_get_accessibility_tree)
on_get_accessibility_tree(accessibility_tree);
}
ErrorOr<String> WebContentView::dump_layout_tree()
{
return String::from_deprecated_string(client().dump_layout_tree());

View file

@ -42,34 +42,7 @@ public:
explicit WebContentView(StringView webdriver_content_ipc_path, WebView::EnableCallgrindProfiling);
virtual ~WebContentView() override;
Function<String(Web::HTML::ActivateTab)> on_new_tab;
Function<String(const AK::URL&, Web::HTML::ActivateTab)> on_tab_open_request;
Function<void()> on_close;
Function<void(Gfx::IntPoint screen_position)> on_context_menu_request;
Function<void(const AK::URL&, DeprecatedString const& target, unsigned modifiers)> on_link_click;
Function<void(const AK::URL&, Gfx::IntPoint screen_position)> on_link_context_menu_request;
Function<void(const AK::URL&, Gfx::IntPoint screen_position, Gfx::ShareableBitmap const&)> on_image_context_menu_request;
Function<void(const AK::URL&, Gfx::IntPoint screen_position, bool, bool, bool)> on_video_context_menu_request;
Function<void(const AK::URL&, DeprecatedString const& target, unsigned modifiers)> on_link_middle_click;
Function<void(const AK::URL&)> on_link_hover;
Function<void(DeprecatedString 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(Web::DOM::Document*)> on_set_document;
Function<void(const AK::URL&, DeprecatedString const&)> on_get_source;
Function<void(DeprecatedString const&)> on_get_dom_tree;
Function<void(i32 node_id, DeprecatedString const& specified_style, DeprecatedString const& computed_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing)> on_get_dom_node_properties;
Function<void(DeprecatedString const&)> on_get_accessibility_tree;
Function<void(i32 message_id)> on_js_console_new_message;
Function<void(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages)> on_get_js_console_messages;
Function<Vector<Web::Cookie::Cookie>(AK::URL const& url)> on_get_all_cookies;
Function<Optional<Web::Cookie::Cookie>(AK::URL const& url, DeprecatedString const& name)> on_get_named_cookie;
Function<DeprecatedString(const AK::URL& url, Web::Cookie::Source source)> on_get_cookie;
Function<void(const AK::URL& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source)> on_set_cookie;
Function<void(Web::Cookie::Cookie const& cookie)> on_update_cookie;
Function<void(i32 count_waiting)> on_resource_status_change;
virtual void paintEvent(QPaintEvent*) override;
virtual void resizeEvent(QResizeEvent*) override;
@ -104,77 +77,22 @@ public:
virtual void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&) override;
virtual void notify_server_did_change_selection(Badge<WebContentClient>) override;
virtual void notify_server_did_request_cursor_change(Badge<WebContentClient>, Gfx::StandardCursor cursor) override;
virtual void notify_server_did_change_title(Badge<WebContentClient>, DeprecatedString const&) override;
virtual void notify_server_did_request_scroll(Badge<WebContentClient>, i32, i32) override;
virtual void notify_server_did_request_scroll_to(Badge<WebContentClient>, Gfx::IntPoint) override;
virtual void notify_server_did_request_scroll_into_view(Badge<WebContentClient>, Gfx::IntRect const&) override;
virtual void notify_server_did_enter_tooltip_area(Badge<WebContentClient>, Gfx::IntPoint, DeprecatedString const&) override;
virtual void notify_server_did_leave_tooltip_area(Badge<WebContentClient>) override;
virtual void notify_server_did_hover_link(Badge<WebContentClient>, const AK::URL&) override;
virtual void notify_server_did_unhover_link(Badge<WebContentClient>) override;
virtual void notify_server_did_click_link(Badge<WebContentClient>, const AK::URL&, DeprecatedString const& target, unsigned modifiers) override;
virtual void notify_server_did_middle_click_link(Badge<WebContentClient>, const AK::URL&, DeprecatedString const& target, unsigned modifiers) override;
virtual void notify_server_did_start_loading(Badge<WebContentClient>, const AK::URL&, bool) override;
virtual void notify_server_did_finish_loading(Badge<WebContentClient>, const AK::URL&) override;
virtual void notify_server_did_request_navigate_back(Badge<WebContentClient>) override;
virtual void notify_server_did_request_navigate_forward(Badge<WebContentClient>) override;
virtual void notify_server_did_request_refresh(Badge<WebContentClient>) override;
virtual void notify_server_did_request_context_menu(Badge<WebContentClient>, Gfx::IntPoint) override;
virtual void notify_server_did_request_link_context_menu(Badge<WebContentClient>, Gfx::IntPoint, const AK::URL&, DeprecatedString const& target, unsigned modifiers) override;
virtual void notify_server_did_request_image_context_menu(Badge<WebContentClient>, Gfx::IntPoint, const AK::URL&, DeprecatedString const& target, unsigned modifiers, Gfx::ShareableBitmap const&) override;
virtual void notify_server_did_request_video_context_menu(Badge<WebContentClient>, Gfx::IntPoint, const AK::URL&, DeprecatedString const& target, unsigned modifiers, bool is_playing, bool has_user_agent_controls, bool is_looping) override;
virtual void notify_server_did_request_alert(Badge<WebContentClient>, String const& message) override;
virtual void notify_server_did_request_confirm(Badge<WebContentClient>, String const& message) override;
virtual void notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_) override;
virtual void notify_server_did_request_set_prompt_text(Badge<WebContentClient>, String const& message) override;
virtual void notify_server_did_request_accept_dialog(Badge<WebContentClient>) override;
virtual void notify_server_did_request_dismiss_dialog(Badge<WebContentClient>) override;
virtual void notify_server_did_get_source(const AK::URL& url, DeprecatedString const& source) override;
virtual void notify_server_did_get_dom_tree(DeprecatedString const& dom_tree) override;
virtual void notify_server_did_get_dom_node_properties(i32 node_id, DeprecatedString const& specified_style, DeprecatedString const& computed_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing) override;
virtual void notify_server_did_get_accessibility_tree(DeprecatedString const& accessibility_tree) override;
virtual void notify_server_did_output_js_console_message(i32 message_index) override;
virtual void notify_server_did_get_js_console_messages(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages) override;
virtual void notify_server_did_change_favicon(Gfx::Bitmap const& favicon) override;
virtual Vector<Web::Cookie::Cookie> notify_server_did_request_all_cookies(Badge<WebContentClient>, AK::URL const& url) override;
virtual Optional<Web::Cookie::Cookie> notify_server_did_request_named_cookie(Badge<WebContentClient>, AK::URL const& url, DeprecatedString const& name) override;
virtual DeprecatedString notify_server_did_request_cookie(Badge<WebContentClient>, const AK::URL& url, Web::Cookie::Source source) override;
virtual void notify_server_did_set_cookie(Badge<WebContentClient>, const AK::URL& url, Web::Cookie::ParsedCookie const& cookie, Web::Cookie::Source source) override;
virtual void notify_server_did_update_cookie(Badge<WebContentClient>, Web::Cookie::Cookie const& cookie) override;
virtual String notify_server_did_request_new_tab(Badge<WebContentClient>, Web::HTML::ActivateTab activate_tab) override;
virtual void notify_server_did_request_activate_tab(Badge<WebContentClient>) override;
virtual void notify_server_did_close_browsing_context(Badge<WebContentClient>) override;
virtual void notify_server_did_update_resource_count(i32 count_waiting) override;
virtual void notify_server_did_request_restore_window() override;
virtual Gfx::IntPoint notify_server_did_request_reposition_window(Gfx::IntPoint) override;
virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize) override;
virtual Gfx::IntRect notify_server_did_request_maximize_window() override;
virtual Gfx::IntRect notify_server_did_request_minimize_window() override;
virtual Gfx::IntRect notify_server_did_request_fullscreen_window() override;
virtual void notify_server_did_request_file(Badge<WebContentClient>, DeprecatedString const& path, i32) override;
virtual void notify_server_did_finish_handling_input_event(bool event_was_accepted) override;
signals:
void activate_tab();
void close();
void link_hovered(QString, int timeout = 0);
void link_unhovered();
void back_mouse_button();
void forward_mouse_button();
void load_started(const URL&, bool);
void title_changed(QString);
void favicon_changed(QIcon);
void got_source(URL, QString);
void navigate_back();
void navigate_forward();
void refresh();
void restore_window();
void urls_dropped(QList<QUrl> const&);
Gfx::IntPoint reposition_window(Gfx::IntPoint);
Gfx::IntSize resize_window(Gfx::IntSize);
Gfx::IntRect maximize_window();
Gfx::IntRect minimize_window();
Gfx::IntRect fullscreen_window();
private:
// ^WebView::ViewImplementation