diff options
author | Linus Groh <mail@linusgroh.de> | 2023-01-12 20:39:08 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-12 23:39:36 +0100 |
commit | 8c11a2c2532dff7d9cb9aabd0a0989b2b8859105 (patch) | |
tree | 9f39bf37066b4db554648a3ec9a836bd5473879f /Userland/Libraries | |
parent | 55609f744d0293a6596a414f110a2535eb0d0486 (diff) | |
download | serenity-8c11a2c2532dff7d9cb9aabd0a0989b2b8859105.zip |
LibWebView+Ladybird: Move running JavaScript to ViewImplementation
Diffstat (limited to 'Userland/Libraries')
4 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index de3c440b45..1b0ff1a1b6 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -552,11 +552,6 @@ void OutOfProcessWebView::js_console_request_messages(i32 start_index) client().async_js_console_request_messages(start_index); } -void OutOfProcessWebView::run_javascript(StringView js_source) -{ - client().async_run_javascript(js_source); -} - DeprecatedString OutOfProcessWebView::selected_text() { return client().get_selected_text(); diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h index a1cf73548c..b06b27d565 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h @@ -36,8 +36,6 @@ public: void js_console_input(DeprecatedString const& js_source); void js_console_request_messages(i32 start_index); - void run_javascript(StringView); - DeprecatedString selected_text(); void select_all(); diff --git a/Userland/Libraries/LibWebView/ViewImplementation.cpp b/Userland/Libraries/LibWebView/ViewImplementation.cpp index 87818c828e..81da873e7a 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.cpp +++ b/Userland/Libraries/LibWebView/ViewImplementation.cpp @@ -104,4 +104,9 @@ void ViewImplementation::debug_request(DeprecatedString const& request, Deprecat client().async_debug_request(request, argument); } +void ViewImplementation::run_javascript(StringView js_source) +{ + client().async_run_javascript(js_source); +} + } diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h index 8d88e216b4..8573a085ec 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.h +++ b/Userland/Libraries/LibWebView/ViewImplementation.h @@ -48,6 +48,8 @@ public: void debug_request(DeprecatedString const& request, DeprecatedString const& argument = {}); + void run_javascript(StringView); + virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size) = 0; virtual void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id) = 0; virtual void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&) = 0; |