-
Notifications
You must be signed in to change notification settings - Fork 47
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
[webview_flutter] Add webview_flutter_tizen package #54
Conversation
What are those |
The file is a library for Tizen lightweight web engine. Because the file is not included in Tizen Studio yet, we decided to include them in the plugin. |
I am sorry, I found unnecessary files. I will remove them. |
ba5dc06
to
573553c
Compare
|
|
Including a ELF file in source tree is not a good practice. Also why does the so file has the |
b3d8c5a
to
eeb05e5
Compare
I have updated the file's suffix from'.mobile' to'.flutter'. |
eeb05e5
to
fe18993
Compare
virtual void DispatchCompositionUpdateEvent(const char* str, | ||
int size) override; | ||
virtual void DispatchCompositionEndEvent(const char* str, int size) override; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried to run example on Tizen device (flutter-tizen run -v
), two errors occurred:
"/home/r.walczyna/tizen-studio/tools/smart-build-interface/../llvm-10/bin/clang++" -c "src/webview_flutter_tizen_plugin.cc" -o "Debug/src/webview_flutter_tizen_plugin.o" -DTIZEN_DEPRECATION -DDEPRECATION_WARNING
-DTIZEN_DEPRECATION
[...]
In file included from src/webview_flutter_tizen_plugin.cc:16:
src/webview.h:34:16: error: 'DispatchCompositionUpdateEvent' marked 'override' but does not override any member functions
virtual void DispatchCompositionUpdateEvent(const char* str,
^
src/webview.h:36:16: error: 'DispatchCompositionEndEvent' marked 'override' but does not override any member functions
virtual void DispatchCompositionEndEvent(const char* str, int size) override;
^
2 errors generated.
After removing not needed overrides
it has built successful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that you need to update flutter-tizen. Actually, I have updated "flutter_platform_view.h" in flutter engine and the file should been applied on flutter-tizen cache side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seungsoo47 An engine release containing this patch has just been released yesterday. The embedder API versioning is a quite complicated problem because a plugin can have only a constraint on the Flutter SDK version (below) but not the Tizen embedder version. I'll tell you a bit more about this matter later.
environment:
flutter: ">=2.0.1"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe libraries that a plugin depends on (liblightweight-web-engine.flutter.so
in this case) should not be manually copied from the plugin directory into a project directory by the developer. Instead, they should automatically be copied by the flutter-tizen tool into a build output directory directly (this can be done in TizenPlugins
of tizen_build_target.dart). I or @HakkyuKim will prepare a fix for this if you agree.
Thank you for your help. Please correct the copy issue. And I will update results for other issues. |
* This PR is created from the PR below: 2bfc038 [webview_flutter] Update README and pubspec (flutter-tizen#53) bdd6a15 [webview_flutter] Enable intergation test (flutter-tizen#52) 18da2a6 [webview_flutter] Update code by flutter version-up (flutter-tizen#49) 1b6eeed [webview_flutter] Handle CompositionEvent (flutter-tizen#47) 791511e [webview_flutter] Optimize tbm allocation (flutter-tizen#42) 7059ce2 [webview_flutter] Add cookie and scroll APIs (flutter-tizen#40) c5a8930 Add some APIs (flutter-tizen#37) 3feae1d [webview_flutter] Add NavigationDelegate and onWebResourceError (flutter-tizen#36) 42b63f8 [webview_flutter] Add removeJavascriptChannels API and Callbacks (flutter-tizen#31) 749930e [webview_flutter] Update LWE (flutter-tizen#28) 9e26386 [webview_flutter] Implement addJavascriptChannels() (flutter-tizen#27) 6a34ae0 [webview_flutter] Update LWE (flutter-tizen#26) a438093 [webview_flutter] Add evaluateJavascript() function (flutter-tizen#25) 0d2c271 [webview_flutter] Update webview to be focused (flutter-tizen#19) b02b245 Enable IMF on Webview (flutter-tizen#17) 571fa4a [webview_flutter_dev] Change webview interface && embedding lwe.so file (flutter-tizen#15) 3413964 [webview_flutter_dev] Enable gl compositor at LWE (flutter-tizen#14) e988cf0 Change method name's first letter (flutter-tizen#13) cb8ee9b Handle key events for tizen webview (flutter-tizen#11) 44987de [webview_flutter] Add webview_flutter initial package (flutter-tizen#7) Co-authored-by: MuHong Byun <mh.byun@samsung.com> Co-authored-by: Seungsoo Lee <seungsoo47.lee@samsung.com>
4ed2ec6
to
4e01af6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid using force-push multiple times as it makes difficult to track code changes. 😢
Theses are just markers for revisiting the original source code later:
TizenWebView
was copied and modified fromAndroidWebView
inpackage:webview_flutter/src/webview_android.dart
.TizenView
was copied and modified fromAndroidView
inpackage:flutter/src/widgets/platform_view.dart
._TizenWebViewState
was copied and modified from_AndroidViewState
in the same file._TizenPlatformTextureView
was copied from_AndroidPlatformView
in the same file.RenderTizenView
was copied and modified fromRenderAndroidView
inpackage:flutter/src/rendering/platform_view.dart
- The enums
PlatformViewHitTestBehavior
and_PlatformViewState
are from the same file. _PlatformViewGestureMixin
and_PlatformViewGestureRecognizer
were copied from the same file._factoryTypesSetEquals
and_factoriesTypeSet
are from the same file.
- The enums
TizenViewController
was copied and modified fromAndroidViewController
andTextureAndroidViewController
inpackage:flutter/src/services/platform_views.dart
.- The enum
_TizenViewState
is the equivalent of_AndroidViewState
in the same file.
- The enum
PlatformViewsServiceTizen
was copied and modified fromPlatformViewsService
inpackage:flutter/src/services/platform_views.dart
.
Please correct me if anything is wrong.
* Replace tabs to spaces in the manifest file * Fix broken READEME.md * Remove unnecessary code
4510e7a
to
1d3dda4
Compare
* In accordance with the guideline, I have updated the initialization code.
} | ||
} else { | ||
throw std::invalid_argument("Unknown WebView setting: " + k); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following two properties were added in webview_flutter:
allowsInlineMediaPlayback
([webview_flutter] Added 'allowsInlineMediaPlayback' property flutter/plugins#3334)hasProgressTracking
([webview_flutter] Support for loading progress tracking flutter/plugins#2151)
I don't know if inline media playback is applicable for Tizen, but at least I can see the RegisterOnProgressChangedHandler
API in the LWE WebContainer so hasProgressTracking
might be supported by webview_flutter_tizen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This plugin is in alpha version. As far as I know, the APIs have been added to the latest version. When our plugin is updated to chromium-based webview, APIs may be also updated.
968c170
to
d5f2f22
Compare
* Data files will be created in application's private area. * Key event including Shift key value will be handled properly.
d5f2f22
to
79d10e5
Compare
Work in progress: flutter-tizen/support-binary-dependencies-in-plugin |
The feature is merged to master, the tool will now put dependent binaries in tpks. You need to set the
and place Future plugin projects created by the tool will have the following comments written in the
|
* Because the latest flutter-tizen supports automatic copy function of plugin-dependent libraries, I updated a prof file and removed a library using in this plugin.
@HakkyuKim Thank you. I updated it in accordance with your guidance and I checked that the example worked fine. |
2bfc038 [webview_flutter] Update README and pubspec ([webview_flutter] Update README and pubspec #53)
bdd6a15 [webview_flutter] Enable intergation test ([webview_flutter] Enable intergation test #52)
18da2a6 [webview_flutter] Update code by flutter version-up ([webview_flutter] Update code by flutter version-up #49)
1b6eeed [webview_flutter] Handle CompositionEvent ([webview_flutter] Handle CompositionEvent #47)
791511e [webview_flutter] Optimize tbm allocation ([webview_flutter] Optimize tbm allocation #42)
7059ce2 [webview_flutter] Add cookie and scroll APIs ([webview_flutter] Add cookie and scroll APIs #40)
c5a8930 Add some APIs ([webview_flutter] Add some APIs #37)
3feae1d [webview_flutter] Add NavigationDelegate and onWebResourceError ([webview_flutter] Add NavigationDelegate and onWebResourceError #36)
42b63f8 [webview_flutter] Add removeJavascriptChannels API and Callbacks ([webview_flutter] Add removeJavascriptChannels API and Callbacks #31)
749930e [webview_flutter] Update LWE ([webview_flutter] Update LWE #28)
9e26386 [webview_flutter] Implement addJavascriptChannels() ([webview_flutter] Implement addJavascriptChannels() #27)
6a34ae0 [webview_flutter] Update LWE ([webview_flutter] Update LWE #26)
a438093 [webview_flutter] Add evaluateJavascript() function ([webview_flutter] Add evaluateJavascript() function #25)
0d2c271 [webview_flutter] Update webview to be focused ([webview_flutter] Update webview to be focused #19)
b02b245 Enable IMF on Webview ([webview_flutter_dev] Enable IMF on Webview #17)
571fa4a [webview_flutter_dev] Change webview interface && embedding lwe.so file ([webview_flutter_dev] Change webview interface && embedding lwe.so file #15)
3413964 [webview_flutter_dev] Enable gl compositor at LWE ([webview_flutter_dev] Enable gl compositor at LWE #14)
e988cf0 Change method name's first letter ([webview_flutter_dev] Change method name's first letter #13)
cb8ee9b Handle key events for tizen webview ([webview_flutter_dev] Handle key events for tizen webview #11)
44987de [webview_flutter] Add webview_flutter initial package ([webview_flutter] Add webview_flutter initial package #7)
Co-authored-by: MuHong Byun mh.byun@samsung.com
Co-authored-by: Seungsoo Lee seungsoo47.lee@samsung.com