Ladybird/Android: Add EditText for URL bar and attach to native WebView

This commit is contained in:
Andrew Kaster 2023-09-23 23:05:15 -06:00 committed by Andrew Kaster
parent a93507231c
commit 4fd915b005
Notes: sideshowbarker 2024-07-17 18:06:52 +09:00
15 changed files with 82 additions and 12 deletions

View file

@ -34,6 +34,13 @@ WebViewImplementationNative::WebViewImplementationNative(jobject thiz)
JavaEnvironment env(global_vm);
env.get()->CallVoidMethod(m_java_instance, invalidate_layout_method);
};
on_load_start = [this](AK::URL const& url, bool is_redirect) {
JavaEnvironment env(global_vm);
auto url_string = env.jstring_from_ak_string(MUST(url.to_string()));
env.get()->CallVoidMethod(m_java_instance, on_load_start_method, url_string, is_redirect);
env.get()->DeleteLocalRef(url_string);
};
}
void WebViewImplementationNative::create_client(WebView::EnableCallgrindProfiling)