Skip to content

[webview_flutter] Introduce webview_flutter base on chromium engine(ewk) #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

bwikbs
Copy link
Member

@bwikbs bwikbs commented Jul 8, 2021

Precondition

  1. Add native window handle to platform view engine#136
  2. You need to copy the following headers from rootstrip, which is used for engine build, to sdk include path.
wayland*.h,
xkbcommon folder

Plan

  1. Rename webview_flutter base on lwe : webview_flutter_tizen -> webview_flutter_tizen_lwe
    (Probably webview_flutter_tizen will be deprecated?)
  2. Add webview_flutter_tizen_ewk

@bwikbs bwikbs force-pushed the webview_ewk branch 6 times, most recently from 06939f1 to d030cf6 Compare July 9, 2021 00:05
@swift-kim
Copy link
Member

Question: What does "ewk" stand for?

@bwikbs
Copy link
Member Author

bwikbs commented Jul 9, 2021

Question: What does "ewk" stand for?

Oh. It stands for evas webkit (probably? ). This is prefix used in traditional tizen webview.

@bbrto21
Copy link
Contributor

bbrto21 commented Jul 9, 2021

There are so many diffs that I feel overwhelmed...If you don't mind, Could you split this PR into at least two or more?

@bwikbs
Copy link
Member Author

bwikbs commented Jul 9, 2021

There are so many diffs that I feel overwhelmed...If you don't mind, Could you split this PR into at least two or more?

👌

Now, It only contains webview_flutter_tizen_ewk

@bwikbs bwikbs force-pushed the webview_ewk branch 3 times, most recently from 5297005 to 0e5e825 Compare July 13, 2021 08:04
* Add webview_flutter_tizen_ewk

Signed-off-by: MuHong Byun <mh.byun@samsung.com>
@bwikbs bwikbs marked this pull request as ready for review July 13, 2021 23:24
@@ -0,0 +1,26 @@
Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
Copyright (c) 2021 Samsung Electronics Co., Ltd. All rights reserved.


This plugin is available on these types of devices:

- Galaxy Watch or TV (running Tizen 5.5 or later)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, unlike LWE, 4.0 or later is enough to support webview_flutter_tizen_ewk.

dev_dependencies:
flutter_driver:
sdk: flutter
integration_test: ^1.0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
integration_test: ^1.0.1
integration_test:
sdk: flutter

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.tizen.webview_flutter_tizen_ewk_example" version="1.0.0" api-version="5.5" xmlns="http://tizen.org/ns/packages">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned earlier, if it is supported in version 4.0, it should be modified.

Suggested change
<manifest package="org.tizen.webview_flutter_tizen_ewk_example" version="1.0.0" api-version="5.5" xmlns="http://tizen.org/ns/packages">
<manifest package="org.tizen.webview_flutter_tizen_ewk_example" version="1.0.0" api-version="4.0" xmlns="http://tizen.org/ns/packages">

@@ -0,0 +1,871 @@
// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is the same as webview_flutter_tizen.dart.
IMO, we could add a new package for this common interface. Like a platform interface.
What do you think? Since big changes are expected, I think we can take time to discuss them slowly.

class WebViewFactory : public PlatformViewFactory {
public:
WebViewFactory(flutter::PluginRegistrar* registrar,
flutter::TextureRegistrar* textureRegistrar);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
flutter::TextureRegistrar* textureRegistrar);
flutter::TextureRegistrar* texture_registrar);

@bbrto21
Copy link
Contributor

bbrto21 commented Jul 14, 2021

packages/webview_flutter_ewk/tizen/lib/armel/libchromium-ewk.so
Why should we include this so?

@bbrto21
Copy link
Contributor

bbrto21 commented Jul 14, 2021

The rootstrap of tizen sdk has the following headers. are these not enough to implement this plugin?
https://docs.tizen.org/application/native/api/wearable/4.0/group__WEBVIEW.html

~/tizen-studio/platforms/tizen-4.0/mobile/rootstraps/mobile-4.0-device.core/usr/include/chromium-ewk $ tree
.
├── EWebKit.h
├── ewk_autofill_profile.h
├── ewk_back_forward_list.h
├── ewk_back_forward_list_item.h
├── ewk_context.h
├── ewk_context_menu.h
├── ewk_cookie_manager.h
├── ewk_error.h
├── ewk_geolocation.h
├── ewk_intercept_request.h
├── ewk_main.h
├── ewk_manifest.h
├── ewk_policy_decision.h
├── ewk_security_origin.h
├── ewk_settings.h
└── ewk_view.h

@bbrto21
Copy link
Contributor

bbrto21 commented Jul 14, 2021

If Public APIs of ewk are not enough, it may be more appropriate to work with our internal repository. and, like our engine, it doesn't seem to be available in some app stores.

@bbrto21
Copy link
Contributor

bbrto21 commented Jul 14, 2021

Furthermore, IMHO, to use the internal API, it seems that we need to set up a private rootstrap(inhouse) and get support to use it in flutter-tizen. There are the necessary internal header files and .so

@bwikbs
Copy link
Member Author

bwikbs commented Jul 14, 2021

After a long discussion, it was concluded that it would be better to develop this webview at in-house repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants