diff --git a/packages/webview_flutter/tizen/src/ewk_internal_api_binding.cc b/packages/webview_flutter/tizen/src/ewk_internal_api_binding.cc index e09a5692d..4ac4a78ce 100644 --- a/packages/webview_flutter/tizen/src/ewk_internal_api_binding.cc +++ b/packages/webview_flutter/tizen/src/ewk_internal_api_binding.cc @@ -42,6 +42,9 @@ bool EwkInternalApiBinding::Initialize() { main.SetArguments = reinterpret_cast( dlsym(handle_, "ewk_set_arguments")); + main.SetVersionPolicy = reinterpret_cast( + dlsym(handle_, "ewk_set_version_policy")); + // ewk_settings settings.ImePanelEnabledSet = reinterpret_cast( @@ -60,7 +63,8 @@ bool EwkInternalApiBinding::Initialize() { return view.SetBackgroundColor && view.FeedTouchEvent && view.SendKeyEvent && view.OffscreenRenderingEnabledSet && view.ImeWindowSet && view.KeyEventsEnabledSet && view.SupportVideoHoleSet && - main.SetArguments && settings.ImePanelEnabledSet && - console_message.LevelGet && console_message.TextGet && - console_message.LineGet && console_message.SourceGet; + main.SetArguments && main.SetVersionPolicy && + settings.ImePanelEnabledSet && console_message.LevelGet && + console_message.TextGet && console_message.LineGet && + console_message.SourceGet; } diff --git a/packages/webview_flutter/tizen/src/ewk_internal_api_binding.h b/packages/webview_flutter/tizen/src/ewk_internal_api_binding.h index c259a9a0a..d3c82f5c9 100644 --- a/packages/webview_flutter/tizen/src/ewk_internal_api_binding.h +++ b/packages/webview_flutter/tizen/src/ewk_internal_api_binding.h @@ -53,9 +53,11 @@ typedef struct { } EwkViewProcTable; typedef void (*EwkSetArgumentsFnPtr)(int argc, char** argv); +typedef void (*EwkSetVersionPolicyFnPtr)(int preference); typedef struct { EwkSetArgumentsFnPtr SetArguments = nullptr; + EwkSetVersionPolicyFnPtr SetVersionPolicy = nullptr; } EwkMainProcTable; typedef struct Ewk_Settings Ewk_Settings; diff --git a/packages/webview_flutter/tizen/src/webview.cc b/packages/webview_flutter/tizen/src/webview.cc index 8fe79c97b..0de9a36c6 100644 --- a/packages/webview_flutter/tizen/src/webview.cc +++ b/packages/webview_flutter/tizen/src/webview.cc @@ -196,6 +196,8 @@ void WebView::Dispose() { &WebView::OnUrlChange); evas_object_del(webview_instance_); } + + ewk_shutdown(); } void WebView::Offset(double left, double top) { @@ -286,6 +288,8 @@ void WebView::SetDirection(int direction) { } void WebView::InitWebView() { + EwkInternalApiBinding::GetInstance().main.SetVersionPolicy(1); + char* chromium_argv[] = { const_cast("--disable-pinch"), const_cast("--js-flags=--expose-gc"),