Skip to content

Commit

Permalink
[webview_flutter_tizen] Change ecore_evas engine for web engine
Browse files Browse the repository at this point in the history
and remove some chromium arguments temporary.
  • Loading branch information
JSUYA committed Jan 4, 2024
1 parent 0d363f0 commit 816cd14
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## NEXT

* Change ecore_evas engine for web engine.
* Remove some chromium arguments temporary.

## 0.9.0

* Update webivew_flutter to 4.4.2.
Expand Down
19 changes: 16 additions & 3 deletions packages/webview_flutter/tizen/src/webview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,17 +289,30 @@ void WebView::InitWebView() {
char* chromium_argv[] = {
const_cast<char*>("--disable-pinch"),
const_cast<char*>("--js-flags=--expose-gc"),
const_cast<char*>("--single-process"),
const_cast<char*>("--no-zygote"),
const_cast<char*>("--disable-web-security"),
// NOTE(jsuya): These flags are not guaranteed to work in certain versions
// of Tizen(6.0). These can be checked later with tizen version
// information.
// const_cast<char*>("--single-process"),
// const_cast<char*>("--no-zygote"),
};
int chromium_argc = sizeof(chromium_argv) / sizeof(chromium_argv[0]);
EwkInternalApiBinding::GetInstance().main.SetArguments(chromium_argc,
chromium_argv);

ewk_init();
Ecore_Evas* evas = ecore_evas_new("wayland_egl", 0, 0, 1, 1, 0);
Ecore_Evas* evas = ecore_evas_new(nullptr, 0, 0, 1, 1, 0);
if (!evas) {
LOG_ERROR("Failed to create ecore evas instance.");
return;
}

webview_instance_ = ewk_view_add(ecore_evas_get(evas));
if (!webview_instance_) {
LOG_ERROR("Failed to create ewk view instance.");
return;
}

ecore_evas_focus_set(evas, true);
ewk_view_focus_set(webview_instance_, true);
EwkInternalApiBinding::GetInstance().view.OffscreenRenderingEnabledSet(
Expand Down

0 comments on commit 816cd14

Please sign in to comment.