[NUI] Add webview context and cookiemanager apis (#2940)
authorzhouleonlei <56956725+zhouleonlei@users.noreply.github.com>
Thu, 22 Apr 2021 02:34:18 +0000 (10:34 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 28 Apr 2021 03:36:30 +0000 (12:36 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.WebContext.cs
src/Tizen.NUI/src/internal/Interop/Interop.WebCookieManager.cs
src/Tizen.NUI/src/internal/WebView/WebContext.cs
src/Tizen.NUI/src/internal/WebView/WebCookieManager.cs

index 3054dcc..c7eaa99 100755 (executable)
@@ -33,9 +33,6 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetCertificateFilePath")]
             public static extern void SetCertificateFilePath(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DisableCache")]
-            public static extern void DisableCache(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetDefaultProxyAuth")]
             public static extern void SetDefaultProxyAuth(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3);
 
@@ -54,11 +51,11 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetWebStorageUsageForOrigin")]
             public static extern bool GetWebStorageUsageForOrigin(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteWebStorage")]
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteAllWebStorage")]
             public static extern void DeleteAllWebStorage(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteWebStorageOrigin")]
-            public static extern bool DeleteWebStorageOrigin(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteWebStorage")]
+            public static extern bool DeleteWebStorage(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteLocalFileSystem")]
             public static extern void DeleteLocalFileSystem(global::System.Runtime.InteropServices.HandleRef jarg1);
@@ -77,6 +74,69 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_RegisterMimeOverriddenCallback")]
             public static extern void RegisterMimeOverriddenCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_EnableCache")]
+            public static extern void EnableCache(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_IsCacheEnabled")]
+            public static extern bool IsCacheEnabled(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetContextCertificateFile")]
+            public static extern string GetCertificateFilePath(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetContextAppId")]
+            public static extern void SetContextAppId(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetContextAppVersion")]
+            public static extern bool SetContextAppVersion(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetContextApplicationType")]
+            public static extern void SetContextApplicationType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetContextTimeOffset")]
+            public static extern void SetContextTimeOffset(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetContextTimeZoneOffset")]
+            public static extern void SetContextTimeZoneOffset(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2, float jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_RegisterUrlSchemesAsCorsEnabled")]
+            public static extern void RegisterUrlSchemesAsCorsEnabled(global::System.Runtime.InteropServices.HandleRef jarg1, string[] jarg2, uint jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_RegisterJsPluginMimeTypes")]
+            public static extern void RegisterJsPluginMimeTypes(global::System.Runtime.InteropServices.HandleRef jarg1, string[] jarg2, uint jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetDefaultZoomFactor")]
+            public static extern void SetDefaultZoomFactor(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetContextDefaultZoomFactor")]
+            public static extern float GetContextDefaultZoomFactor(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteAllApplicationCache")]
+            public static extern bool DeleteAllApplicationCache(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteAllWebIndexedDatabase")]
+            public static extern bool DeleteAllWebIndexedDatabase(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteFormPasswordDataList")]
+            public static extern void DeleteFormPasswordDataList(global::System.Runtime.InteropServices.HandleRef jarg1, string[] jarg2, uint jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteAllFormPasswordData")]
+            public static extern void DeleteAllFormPasswordData(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteAllFormCandidateData")]
+            public static extern void DeleteAllFormCandidateData(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetContextProxy")]
+            public static extern string GetContextProxy(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetContextProxy")]
+            public static extern void SetContextProxy(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetProxyBypassRule")]
+            public static extern string GetProxyBypassRule(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_FreeUnusedMemory")]
+            public static extern bool FreeUnusedMemory(global::System.Runtime.InteropServices.HandleRef jarg1);
         }
     }
 }
index d634f14..94794d7 100755 (executable)
@@ -32,6 +32,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebCookieManager_ClearCookies")]
             public static extern void ClearCookies(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebCookieManager_ChangesWatch")]
+            public static extern void CookieChangedCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
         }
     }
 }
index 5ee9ddc..b6d578b 100755 (executable)
@@ -28,8 +28,10 @@ namespace Tizen.NUI
     public class WebContext : Disposable
     {
         private string proxyUri;
-        private string certificateFilePath;
-        private bool disableCache;
+        private string appId;
+        private string appVersion;
+        private float timeOffset;
+        private ApplicationType applicationType;
         private SecurityOriginListAcquiredCallback securityOriginListAcquiredCallback;
         private readonly WebContextSecurityOriginListAcquiredProxyCallback securityOriginListAcquiredProxyCallback;
         private PasswordDataListAcquiredCallback passwordDataListAcquiredCallback;
@@ -108,6 +110,37 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Application type
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum ApplicationType
+        {
+            /// <summary>
+            /// Web browser.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            WebBrowser,
+
+            /// <summary>
+            /// Hbb tv.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            HbbTv,
+
+            /// <summary>
+            /// Web runtime.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            WebRuntime,
+
+            /// <summary>
+            /// Other.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Other,
+        }
+
+        /// <summary>
         /// Cache model
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -120,6 +153,7 @@ namespace Tizen.NUI
             set
             {
                 Interop.WebContext.SetCacheModel(SwigCPtr, (int)value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
         }
 
@@ -137,8 +171,9 @@ namespace Tizen.NUI
             {
                 if (value != null)
                 {
-                    proxyUri = value.AbsoluteUri;
                     Interop.WebContext.SetProxyUri(SwigCPtr, proxyUri);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                    proxyUri = value.AbsoluteUri;
                 }
             }
         }
@@ -151,12 +186,12 @@ namespace Tizen.NUI
         {
             get
             {
-                return certificateFilePath;
+                return Interop.WebContext.GetCertificateFilePath(SwigCPtr);
             }
             set
             {
-                certificateFilePath = value;
                 Interop.WebContext.SetCertificateFilePath(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
         }
 
@@ -164,16 +199,129 @@ namespace Tizen.NUI
         /// Disable cache or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool DisableCache
+        public bool CacheEnabled
+        {
+            get
+            {
+                return Interop.WebContext.IsCacheEnabled(SwigCPtr);
+            }
+            set
+            {
+                Interop.WebContext.EnableCache(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        /// <summary>
+        /// Set context app id.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string AppId
         {
             get
             {
-                return disableCache;
+                return appId;
             }
             set
             {
-                disableCache = value;
-                Interop.WebContext.DisableCache(SwigCPtr, value);
+                Interop.WebContext.SetContextAppId(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                appId = value;
+            }
+        }
+
+        /// <summary>
+        /// Set context app version.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string AppVersion
+        {
+            get
+            {
+                return appVersion;
+            }
+            set
+            {
+                Interop.WebContext.SetContextAppVersion(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                appVersion = value;
+            }
+        }
+
+        /// <summary>
+        /// Set context app type.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ApplicationType AppType
+        {
+            get
+            {
+                return applicationType;
+            }
+            set
+            {
+                Interop.WebContext.SetContextApplicationType(SwigCPtr, (int)value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                applicationType = value;
+            }
+        }
+
+        /// <summary>
+        /// Set context time offset.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float TimeOffset
+        {
+            get
+            {
+                return timeOffset;
+            }
+            set
+            {
+                Interop.WebContext.SetContextTimeOffset(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                timeOffset = value;
+            }
+        }
+
+        /// <summary>
+        /// Default zoom factor.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float DefaultZoomFactor
+        {
+            get
+            {
+                return Interop.WebContext.GetContextDefaultZoomFactor(SwigCPtr);
+            }
+            set
+            {
+                Interop.WebContext.SetDefaultZoomFactor(SwigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        /// <summary>
+        /// Get context proxy.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string ContextProxy
+        {
+            get
+            {
+                return Interop.WebContext.GetContextProxy(SwigCPtr);
+            }
+        }
+
+        /// <summary>
+        /// get proxy bypass rule.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string ProxyBypassRule
+        {
+            get
+            {
+                return Interop.WebContext.GetProxyBypassRule(SwigCPtr);
             }
         }
 
@@ -268,7 +416,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool DeleteWebStorage(WebSecurityOrigin origin)
         {
-            bool result = Interop.WebContext.DeleteWebStorageOrigin(SwigCPtr, WebSecurityOrigin.getCPtr(origin));
+            bool result = Interop.WebContext.DeleteWebStorage(SwigCPtr, WebSecurityOrigin.getCPtr(origin));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return result;
         }
@@ -342,6 +490,125 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Set context time zone offset.
+        /// <param name="offset">Time offset</param>
+        /// <param name="time">Daylight saving time</param>
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetContextTimeZoneOffset(float offset, float time)
+        {
+            Interop.WebContext.SetContextTimeZoneOffset(SwigCPtr, offset, time);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Register url schemes enabled.
+        /// <param name="strArray">The string array of schemes</param>
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void RegisterUrlSchemesAsCorsEnabled(string[] strArray)
+        {
+            if (strArray != null)
+            {
+                Interop.WebContext.RegisterUrlSchemesAsCorsEnabled(SwigCPtr, strArray, (uint)strArray.Length);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        /// <summary>
+        /// Register js plugin mime types.
+        /// <param name="strArray">The string array of types</param>
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void RegisterJsPluginMimeTypes(string[] strArray)
+        {
+            if (strArray != null)
+            {
+                Interop.WebContext.RegisterJsPluginMimeTypes(SwigCPtr, strArray, (uint)strArray.Length);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        /// <summary>
+        /// Delete all application cache.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool DeleteAllApplicationCache()
+        {
+            bool ret = Interop.WebContext.DeleteAllApplicationCache(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Delete all web indexed database.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool DeleteAllWebIndexedDatabase()
+        {
+            bool ret = Interop.WebContext.DeleteAllWebIndexedDatabase(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Delete password dataList.
+        /// <param name="strArray">The string array of dataList</param>
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void DeleteFormPasswordDataList(string[] strArray)
+        {
+            if (strArray != null)
+            {
+                Interop.WebContext.DeleteFormPasswordDataList(SwigCPtr, strArray, (uint)strArray.Length);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        /// <summary>
+        /// Delete all password data.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void DeleteAllFormPasswordData()
+        {
+            Interop.WebContext.DeleteAllFormPasswordData(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Delete all candidate data.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void DeleteAllFormCandidateData()
+        {
+            Interop.WebContext.DeleteAllFormCandidateData(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Set context proxy.
+        /// <param name="proxy">The string array of dataList</param>
+        /// <param name="rule">Bypass rule</param>
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetContextProxy(string proxy, string rule)
+        {
+            Interop.WebContext.SetContextProxy(SwigCPtr, proxy, rule);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Free unused memory.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool FreeUnusedMemory()
+        {
+            bool ret = Interop.WebContext.FreeUnusedMemory(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         private void OnSecurityOriginListAcquired(IntPtr list)
         {
             WebSecurityOriginList originList = new WebSecurityOriginList(list, true);
index 20a9cd0..cd2df41 100755 (executable)
@@ -15,7 +15,9 @@
  *
  */
 
+using System;
 using System.ComponentModel;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
@@ -25,10 +27,38 @@ namespace Tizen.NUI
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class WebCookieManager : Disposable
     {
+        private EventHandler<EventArgs> cookieChangedEventHandler;
+        private CookieChangedCallback cookieChangedCallback;
+
         internal WebCookieManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
         }
 
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void CookieChangedCallback();
+
+        /// <summary>
+        /// Event for cookie changed when cookies are added, removed or modified.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<EventArgs> CookieChanged
+        {
+            add
+            {
+                if (cookieChangedEventHandler == null)
+                {
+                    cookieChangedCallback = OnCookieChanged;
+                    IntPtr ip = Marshal.GetFunctionPointerForDelegate(cookieChangedCallback);
+                    Interop.WebCookieManager.CookieChangedCallback(SwigCPtr, new HandleRef(this, ip));
+                }
+                cookieChangedEventHandler += value;
+            }
+            remove
+            {
+                cookieChangedEventHandler -= value;
+            }
+        }
+
         /// <summary>
         /// Cookie Accept Policy
         /// </summary>
@@ -55,22 +85,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Cookie accept policy
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public CookieAcceptPolicyType CookieAcceptPolicy
-        {
-            get
-            {
-                return (CookieAcceptPolicyType)Interop.WebCookieManager.GetCookieAcceptPolicy(SwigCPtr);
-            }
-            set
-            {
-                Interop.WebCookieManager.SetCookieAcceptPolicy(SwigCPtr, (int)value);
-            }
-        }
-
-        /// <summary>
         /// Cookie persistent storage type.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -90,6 +104,22 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Cookie accept policy
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CookieAcceptPolicyType CookieAcceptPolicy
+        {
+            get
+            {
+                return (CookieAcceptPolicyType)Interop.WebCookieManager.GetCookieAcceptPolicy(SwigCPtr);
+            }
+            set
+            {
+                Interop.WebCookieManager.SetCookieAcceptPolicy(SwigCPtr, (int)value);
+            }
+        }
+
+        /// <summary>
         /// Set the proxy uri.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -108,5 +138,10 @@ namespace Tizen.NUI
             Interop.WebCookieManager.ClearCookies(SwigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
+
+        private void OnCookieChanged()
+        {
+            cookieChangedEventHandler?.Invoke(this, new EventArgs());
+        }
     }
 }