Skip to content

Commit d07af14

Browse files
committed
[webview_flutter] WIP
Signed-off-by: MuHong Byun <[email protected]>
1 parent 45896bd commit d07af14

File tree

7 files changed

+24
-9
lines changed

7 files changed

+24
-9
lines changed

packages/webview_flutter/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@
4646
* Update webivew_flutter to 2.1.1
4747

4848
## 0.3.8
49-
* Update webivew_flutter to 2.3.0
49+
* Update webivew_flutter to 2.3.0
50+
51+
## 0.3.9
52+
* Update LWE binary

packages/webview_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: webview_flutter_tizen
22
description: Tizen implementation of the webview plugin
33
homepage: https://github.com/flutter-tizen/plugins
44
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/webview_flutter
5-
version: 0.3.8
5+
version: 0.3.9
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"

packages/webview_flutter/tizen/inc/lwe/LWEWebView.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class LWE_EXPORT Settings {
8585
bool NeedsDownloadWebFontsEarly() const;
8686
bool UseHttp2() const;
8787
uint32_t NeedsDownScaleImageResourceLargerThan() const;
88+
bool ScrollbarVisible() const;
8889
void SetUserAgentString(const std::string& ua);
8990
void SetCacheMode(int mode);
9091
void SetProxyURL(const std::string& proxyURL);
@@ -101,6 +102,7 @@ class LWE_EXPORT Settings {
101102
void SetUseHttp2(bool b);
102103
void SetNeedsDownScaleImageResourceLargerThan(
103104
uint32_t demention); // Experimental
105+
void SetScrollbarVisible(bool visible);
104106

105107
private:
106108
std::string m_defaultUserAgent;
@@ -117,6 +119,7 @@ class LWE_EXPORT Settings {
117119
bool m_needsDownloadWebFontsEarly;
118120
bool m_useHttp2; // default value is false
119121
uint32_t m_needsDownScaleImageResourceLargerThan;
122+
bool m_scrollbarVisible;
120123
};
121124

122125
class LWE_EXPORT ResourceError {
@@ -149,6 +152,10 @@ class LWE_EXPORT WebContainer {
149152
size_t bufferStride;
150153
};
151154

155+
struct ExternalImageInfo {
156+
void* imageAddress;
157+
};
158+
152159
struct RenderResult {
153160
size_t updatedX;
154161
size_t updatedY;
@@ -163,6 +170,13 @@ class LWE_EXPORT WebContainer {
163170
void RegisterOnRenderedHandler(
164171
const std::function<void(WebContainer*,
165172
const RenderResult& renderResult)>& cb);
173+
174+
static WebContainer* CreateWithPlatformImage(
175+
unsigned width, unsigned height,
176+
const std::function<ExternalImageInfo(void)>& prepareImageCb,
177+
const std::function<void(WebContainer*, bool needsFlush)>& flushCb,
178+
float devicePixelRatio, const char* defaultFontName, const char* locale,
179+
const char* timezoneID);
166180
// <--- end of function set for render to buffer
167181

168182
// Function set for render with OpenGL
@@ -174,10 +188,6 @@ class LWE_EXPORT WebContainer {
174188
float devicePixelRatio, const char* defaultFontName, const char* locale,
175189
const char* timezoneID);
176190

177-
struct ExternalImageInfo {
178-
void* imageAddress;
179-
};
180-
181191
static WebContainer* CreateGLWithPlatformImage(
182192
unsigned width, unsigned height,
183193
const std::function<void(WebContainer*)>& onGLMakeCurrent,
@@ -187,6 +197,7 @@ class LWE_EXPORT WebContainer {
187197
const std::function<void(WebContainer*, bool needsFlush)>& flushCb,
188198
float devicePixelRatio, const char* defaultFontName, const char* locale,
189199
const char* timezoneID);
200+
190201
// <--- end of function set for render with OpenGL
191202

192203
// Function set for headless
Binary file not shown.
Binary file not shown.
Binary file not shown.

packages/webview_flutter/tizen/src/webview.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ extern "C" size_t LWE_EXPORT createWebViewInstance(
2828
const char* timezoneID,
2929
const std::function<::LWE::WebContainer::ExternalImageInfo(void)>&
3030
prepareImageCb,
31-
const std::function<void(::LWE::WebContainer*, bool isRendered)>&
32-
renderedCb);
31+
const std::function<void(::LWE::WebContainer*, bool needsFlush)>& flushCb,
32+
bool useSWBackend);
3333

3434
template <typename T = flutter::EncodableValue>
3535
class NavigationRequestResult : public flutter::MethodResult<T> {
@@ -788,7 +788,8 @@ void WebView::InitWebView() {
788788
candidate_surface_ = working_surface_;
789789
working_surface_ = nullptr;
790790
}
791-
});
791+
},
792+
false);
792793
#ifndef TV_PROFILE
793794
auto settings = webview_instance_->GetSettings();
794795
settings.SetUserAgentString(

0 commit comments

Comments
 (0)