From: huayong.xu Date: Fri, 19 Jan 2024 07:09:31 +0000 (+0800) Subject: [NUI][API10] Create Context/CookieManager when WebView is created. X-Git-Tag: accepted/tizen/7.0/unified/20240122.080507~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ae05462a8781b797cd84bc7c232007cda057f9a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI][API10] Create Context/CookieManager when WebView is created. --- diff --git a/src/Tizen.NUI/src/public/WebView/WebView.cs b/src/Tizen.NUI/src/public/WebView/WebView.cs index 62bce76..4a10a3c 100755 --- a/src/Tizen.NUI/src/public/WebView/WebView.cs +++ b/src/Tizen.NUI/src/public/WebView/WebView.cs @@ -29,9 +29,6 @@ namespace Tizen.NUI.BaseComponents /// 9 public partial class WebView : View { - private static readonly WebContext context = new WebContext(Interop.WebView.GetWebContext(), false); - private static readonly WebCookieManager cookieManager = new WebCookieManager(Interop.WebView.GetWebCookieManager(), false); - private Color contentBackgroundColor; private bool tilesClearedWhenHidden; private float tileCoverAreaMultiplier; @@ -989,13 +986,25 @@ namespace Tizen.NUI.BaseComponents /// Context. /// [EditorBrowsable(EditorBrowsableState.Never)] - public WebContext Context => context; + public WebContext Context + { + get + { + return new WebContext(Interop.WebView.GetWebContext(), false); + } + } /// /// CookieManager. /// [EditorBrowsable(EditorBrowsableState.Never)] - public WebCookieManager CookieManager => cookieManager; + public WebCookieManager CookieManager + { + get + { + return new WebCookieManager(Interop.WebView.GetWebCookieManager(), false); + } + } /// /// BackForwardList.