1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibWebView: Move OutOfProcessWebView to a new LibWebView library

Also moves WebContentClient and the references to the generated IPC
descriptions, since they are all components of OutOfProcessWebView.

This patch has no functional changes.
This commit is contained in:
DexesTTP 2022-04-30 10:46:33 +02:00 committed by Andreas Kling
parent 31c0022429
commit dcbbbf5b4a
41 changed files with 97 additions and 73 deletions

View file

@ -15,5 +15,5 @@ set(SOURCES
)
serenity_app(TextEditor ICON app-text-editor)
target_link_libraries(TextEditor LibWeb LibMarkdown LibGUI LibShell LibRegex LibDesktop LibCpp LibJS LibSQL LibFileSystemAccessClient LibConfig LibMain)
target_link_libraries(TextEditor LibWebView LibWeb LibMarkdown LibGUI LibShell LibRegex LibDesktop LibCpp LibJS LibSQL LibFileSystemAccessClient LibConfig LibMain)
link_with_unicode_data(TextEditor)

View file

@ -41,7 +41,7 @@
#include <LibSQL/AST/SyntaxHighlighter.h>
#include <LibWeb/CSS/SyntaxHighlighter/SyntaxHighlighter.h>
#include <LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h>
#include <LibWeb/OutOfProcessWebView.h>
#include <LibWebView/OutOfProcessWebView.h>
#include <Shell/SyntaxHighlighter.h>
namespace TextEditor {
@ -311,11 +311,11 @@ MainWidget::MainWidget()
m_toolbar->add_action(m_editor->redo_action());
}
Web::OutOfProcessWebView& MainWidget::ensure_web_view()
WebView::OutOfProcessWebView& MainWidget::ensure_web_view()
{
if (!m_page_view) {
auto& web_view_container = *find_descendant_of_type_named<GUI::Widget>("web_view_container");
m_page_view = web_view_container.add<Web::OutOfProcessWebView>();
m_page_view = web_view_container.add<WebView::OutOfProcessWebView>();
m_page_view->on_link_hover = [this](auto& url) {
if (url.is_valid())
m_statusbar->set_text(url.to_string());

View file

@ -16,7 +16,7 @@
#include <LibGUI/TextEditor.h>
#include <LibGUI/Widget.h>
#include <LibGUI/Window.h>
#include <LibWeb/Forward.h>
#include <LibWebView/Forward.h>
namespace TextEditor {
@ -51,7 +51,7 @@ private:
void update_markdown_preview();
void update_html_preview();
Web::OutOfProcessWebView& ensure_web_view();
WebView::OutOfProcessWebView& ensure_web_view();
void set_web_view_visible(bool);
virtual void drop_event(GUI::DropEvent&) override;
@ -134,7 +134,7 @@ private:
RefPtr<GUI::Action> m_shell_highlight;
RefPtr<GUI::Action> m_sql_highlight;
RefPtr<Web::OutOfProcessWebView> m_page_view;
RefPtr<WebView::OutOfProcessWebView> m_page_view;
bool m_auto_detect_preview_mode { false };
bool m_use_regex { false };