Implement WebView APIs (#823)
authorJiyun Yang <ji.yang@samsung.com>
Tue, 14 May 2019 08:34:45 +0000 (17:34 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 14 May 2019 08:34:45 +0000 (17:34 +0900)
Add Properties
* CACHE_MODEL
* COOKIE_ACCEPT_POLICY
* USER_AGENT
* JAVASCRIPT_ENABLED
* LOAD_IMAGE_AUTOMATICALLY
* DEFAULT_TEXT_ENCODING_NAME
* DEFAULT_FONT_SIZE

Add Signals
* PageLoadErrorSignal

Add Methods
* Suspend
* Resume
* ClearCookies

Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs
src/Tizen.NUI/src/internal/WebView.cs
src/Tizen.NUI/src/internal/WebViewPageLoadErrorEventArgs.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/WebViewPageLoadEventArgs.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/NUIConstants.cs

index 868a2b8..e533e26 100755 (executable)
@@ -34,13 +34,40 @@ namespace Tizen.NUI
             public static extern global::System.IntPtr WebView_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_LoadUrl")]
-            public static extern void WebView_LoadUrl(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_URL_get")]
+            public static extern int WebView_Property_URL_get();
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_CACHE_MODEL_get")]
+            public static extern int WebView_Property_CACHE_MODEL_get();
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_COOKIE_ACCEPT_POLICY_get")]
+            public static extern int WebView_Property_COOKIE_ACCEPT_POLICY_get();
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_USER_AGENT_get")]
+            public static extern int WebView_Property_USER_AGENT_get();
+
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_ENABLE_JAVASCRIPT_get")]
+            public static extern int WebView_Property_ENABLE_JAVASCRIPT_get();
 
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_GetUrl")]
-            public static extern string WebView_GetUrl(global::System.Runtime.InteropServices.HandleRef jarg1);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_LOAD_IMAGES_AUTOMATICALLY_get")]
+            public static extern int WebView_Property_LOAD_IMAGES_AUTOMATICALLY_get();
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_DEFAULT_TEXT_ENCODING_NAME_get")]
+            public static extern int WebView_Property_DEFAULT_TEXT_ENCODING_NAME_get();
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Property_DEFAULT_FONT_SIZE_get")]
+            public static extern int WebView_Property_DEFAULT_FONT_SIZE_get();
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_LoadUrl")]
+            public static extern void WebView_LoadUrl(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
 
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_LoadHTMLString")]
@@ -55,6 +82,13 @@ namespace Tizen.NUI
             public static extern void WebView_StopLoading(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Suspend")]
+            public static extern void WebView_Suspend(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Resume")]
+            public static extern void WebView_Resume(global::System.Runtime.InteropServices.HandleRef jarg1);
+
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_GoBack")]
             public static extern void WebView_GoBack(global::System.Runtime.InteropServices.HandleRef jarg1);
@@ -68,53 +102,67 @@ namespace Tizen.NUI
             public static extern bool WebView_CanGoBack(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_CanGoForward")]
             public static extern bool WebView_CanGoForward(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_EvaluateJavaScript")]
-            public static extern void WebView_EvaluateJavaScript(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
-
+            public static extern void WebView_EvaluateJavaScript(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_AddJavaScriptMessageHandler")]
             public static extern void WebView_AddJavaScriptMessageHandler(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
 
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_ClearHistory")]
             public static extern void WebView_ClearHistory(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_ClearCache")]
             public static extern void WebView_ClearCache(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_ClearCookies")]
+            public static extern void WebView_ClearCookies(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_SWIGUpcast")]
             public static extern global::System.IntPtr WebView_SWIGUpcast(global::System.IntPtr jarg1);
 
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewSignalProxy_PageLoadStarted")]
-            public static extern global::System.IntPtr new_WebViewSignalProxy_PageLoadStarted(global::System.Runtime.InteropServices.HandleRef jarg1);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewPageLoadSignal_PageLoadStarted")]
+            public static extern global::System.IntPtr new_WebViewPageLoadSignal_PageLoadStarted(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewPageLoadSignal_PageLoadFinished")]
+            public static extern global::System.IntPtr new_WebViewPageLoadSignal_PageLoadFinished(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebViewPageLoadSignal")]
+            public static extern void delete_WebViewPageLoadSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewPageLoadSignal_Connect")]
+            public static extern void WebViewPageLoadSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewPageLoadSignal_Disconnect")]
+            public static extern void WebViewPageLoadSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewSignalProxy_PageLoadFinished")]
-            public static extern global::System.IntPtr new_WebViewSignalProxy_PageLoadFinished(global::System.Runtime.InteropServices.HandleRef jarg1);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewPageLoadErrorSignal_PageLoadError")]
+            public static extern global::System.IntPtr new_WebViewPageLoadErrorSignal_PageLoadError(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebViewSignalProxy")]
-            public static extern void delete_WebViewSignalProxy(global::System.Runtime.InteropServices.HandleRef jarg1);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebViewPageLoadErrorSignal")]
+            public static extern void delete_WebViewPageLoadErrorSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
 
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewSignalProxy_Connect")]
-            public static extern void WebViewSignalProxy_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewPageLoadErrorSignal_Connect")]
+            public static extern void WebViewPageLoadErrorSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewSignalProxy_Disconnect")]
-            public static extern void WebViewSignalProxy_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewPageLoadErrorSignal_Disconnect")]
+            public static extern void WebViewPageLoadErrorSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
         }
     }
index e03fd79..652f707 100755 (executable)
@@ -20,6 +20,7 @@ using System.ComponentModel;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -30,29 +31,55 @@ namespace Tizen.NUI
     public class WebView : View
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void WebViewPageLoadCallbackDelegate(IntPtr data, string pageUrl);
+
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void WebViewPageLoadErrorCallbackDelegate(IntPtr data, string pageUrl, int errorCode);
+
+        private readonly WebViewPageLoadSignal pageLoadStartedSignal;
+        private EventHandler<WebViewPageLoadEventArgs> pageLoadStartedEventHandler;
+        private WebViewPageLoadCallbackDelegate pageLoadStartedCallback;
+
+        private readonly WebViewPageLoadSignal pageLoadFinishedSignal;
+        private EventHandler<WebViewPageLoadEventArgs> pageLoadFinishedEventHandler;
+        private WebViewPageLoadCallbackDelegate pageLoadFinishedCallback;
+
+        private readonly WebViewPageLoadErrorSignal pageLoadErrorSignal;
+        private EventHandler<WebViewPageLoadErrorEventArgs> pageLoadErrorEventHandler;
+        private WebViewPageLoadErrorCallbackDelegate pageLoadErrorCallback;
+
         internal WebView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.WebView.WebView_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
 
-            InitializeSignals();
+            pageLoadStartedSignal = new WebViewPageLoadSignal(Interop.WebView.new_WebViewPageLoadSignal_PageLoadStarted(swigCPtr));
+            pageLoadFinishedSignal = new WebViewPageLoadSignal(Interop.WebView.new_WebViewPageLoadSignal_PageLoadFinished(swigCPtr));
+            pageLoadErrorSignal = new WebViewPageLoadErrorSignal(Interop.WebView.new_WebViewPageLoadErrorSignal_PageLoadError(swigCPtr));
         }
 
-        private global::System.Runtime.InteropServices.HandleRef pageLoadStartedSignalProxy;
-        private global::System.Runtime.InteropServices.HandleRef pageLoadFinishedSignalProxy;
-        private void InitializeSignals()
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebView obj)
         {
-            pageLoadStartedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(this, Interop.WebView.new_WebViewSignalProxy_PageLoadStarted(swigCPtr));
-            pageLoadFinishedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(this, Interop.WebView.new_WebViewSignalProxy_PageLoadFinished(swigCPtr));
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebView obj)
+        internal WebView Assign(WebView webView)
         {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+            WebView ret = new WebView(Interop.WebView.WebView_Assign(swigCPtr, WebView.getCPtr(webView)), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
         }
 
+        internal static WebView DownCast(BaseHandle handle)
+        {
+            WebView ret = new WebView(Interop.WebView.WebView_DownCast(BaseHandle.getCPtr(handle)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
 
         /// <summary>
-        /// To make Button instance be disposed.
+        /// Dispose for IDisposable pattern
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override void Dispose(DisposeTypes type)
@@ -67,15 +94,15 @@ namespace Tizen.NUI
                 //Called by User
                 //Release your own managed resources here.
                 //You should release all of your own disposable objects here.
-
+                pageLoadStartedSignal.Dispose();
+                pageLoadFinishedSignal.Dispose();
+                pageLoadErrorSignal.Dispose();
             }
 
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            DisposeSignals();
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -89,29 +116,202 @@ namespace Tizen.NUI
             base.Dispose(type);
         }
 
-        private void DisposeSignals()
+        private void OnPageLoadStarted(IntPtr data, string pageUrl)
         {
-            if (pageLoadStartedSignalProxy.Handle != global::System.IntPtr.Zero)
+            WebViewPageLoadEventArgs e = new WebViewPageLoadEventArgs();
+
+            e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
+            e.PageUrl = pageUrl;
+
+            if (pageLoadStartedEventHandler != null)
             {
-                if (pageLoadStartedCallback != null)
-                {
-                    WebViewProxyDisconnect(pageLoadStartedSignalProxy, pageLoadStartedCallback);
-                }
-                Interop.WebView.delete_WebViewSignalProxy(pageLoadStartedSignalProxy);
-                pageLoadStartedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                pageLoadStartedEventHandler(this, e);
             }
+        }
+
+        private void OnPageLoadFinished(IntPtr data, string pageUrl)
+        {
+            WebViewPageLoadEventArgs e = new WebViewPageLoadEventArgs();
 
-            if (pageLoadFinishedSignalProxy.Handle != global::System.IntPtr.Zero)
+            e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
+            e.PageUrl = pageUrl;
+
+            if (pageLoadFinishedEventHandler != null)
             {
-                if (pageLoadFinishedCallback != null)
-                {
-                    WebViewProxyDisconnect(pageLoadFinishedSignalProxy, pageLoadFinishedCallback);
-                }
-                Interop.WebView.delete_WebViewSignalProxy(pageLoadFinishedSignalProxy);
-                pageLoadFinishedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                pageLoadFinishedEventHandler(this, e);
+            }
+        }
+
+        private void OnPageLoadError(IntPtr data, string pageUrl, int errorCode)
+        {
+            WebViewPageLoadErrorEventArgs e = new WebViewPageLoadErrorEventArgs();
+
+            e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
+            e.PageUrl = pageUrl;
+            e.ErrorCode = (WebViewPageLoadErrorEventArgs.LoadErrorCode)errorCode;
+
+            if (pageLoadErrorEventHandler != null)
+            {
+                pageLoadErrorEventHandler(this, e);
             }
         }
 
+        internal static new class Property
+        {
+            internal static readonly int URL = Interop.WebView.WebView_Property_URL_get();
+            internal static readonly int CACHE_MODEL = Interop.WebView.WebView_Property_CACHE_MODEL_get();
+            internal static readonly int COOKIE_ACCEPT_POLICY = Interop.WebView.WebView_Property_COOKIE_ACCEPT_POLICY_get();
+            internal static readonly int USER_AGENT = Interop.WebView.WebView_Property_USER_AGENT_get();
+            internal static readonly int ENABLE_JAVASCRIPT = Interop.WebView.WebView_Property_ENABLE_JAVASCRIPT_get();
+            internal static readonly int LOAD_IMAGES_AUTOMATICALLY = Interop.WebView.WebView_Property_LOAD_IMAGES_AUTOMATICALLY_get();
+            internal static readonly int DEFAULT_TEXT_ENCODING_NAME = Interop.WebView.WebView_Property_DEFAULT_TEXT_ENCODING_NAME_get();
+            internal static readonly int DEFAULT_FONT_SIZE = Interop.WebView.WebView_Property_DEFAULT_FONT_SIZE_get();
+        }
+
+        private static readonly BindableProperty UrlProperty = BindableProperty.Create(nameof(Url), typeof(string), typeof(WebView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.URL, new Tizen.NUI.PropertyValue((string)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            string temp;
+            Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.URL).Get(out temp);
+            return temp;
+        });
+
+        private static readonly BindableProperty CacheModelProperty = BindableProperty.Create(nameof(CacheModel), typeof(CacheModel), typeof(WebView), CacheModel.DocumentViewer, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.CACHE_MODEL, new Tizen.NUI.PropertyValue((int)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            string temp;
+            if (Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.CACHE_MODEL).Get(out temp) == false)
+            {
+                NUILog.Error("CacheModel get error!");
+            }
+            switch (temp)
+            {
+                case "DOCUMENT_VIEWER": return CacheModel.DocumentViewer;
+                case "DOCUMENT_BROWSER": return CacheModel.DocumentBrowser;
+                default: return CacheModel.PrimaryWebBrowser;
+            }
+        });
+
+        private static readonly BindableProperty CookieAcceptPolicyProperty = BindableProperty.Create(nameof(CookieAcceptPolicy), typeof(CookieAcceptPolicy), typeof(WebView), CookieAcceptPolicy.NoThirdParty, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.COOKIE_ACCEPT_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            string temp;
+            if (Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.COOKIE_ACCEPT_POLICY).Get(out temp) == false)
+            {
+                NUILog.Error("CookieAcceptPolicy get error!");
+            }
+            switch (temp)
+            {
+                case "ALWAYS": return CookieAcceptPolicy.Always;
+                case "NEVER": return CookieAcceptPolicy.Never;
+                default: return CookieAcceptPolicy.NoThirdParty;
+            }
+        });
+
+        private static readonly BindableProperty UserAgentProperty = BindableProperty.Create(nameof(UserAgent), typeof(string), typeof(WebView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.USER_AGENT, new Tizen.NUI.PropertyValue((string)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            string temp;
+            Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.USER_AGENT).Get(out temp);
+            return temp;
+        });
+
+        private static readonly BindableProperty EnableJavaScriptProperty = BindableProperty.Create(nameof(EnableJavaScript), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.ENABLE_JAVASCRIPT, new Tizen.NUI.PropertyValue((bool)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            bool temp;
+            Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.ENABLE_JAVASCRIPT).Get(out temp);
+            return temp;
+        });
+
+        private static readonly BindableProperty LoadImagesAutomaticallyProperty = BindableProperty.Create(nameof(LoadImagesAutomatically), typeof(bool), typeof(WebView), true, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.LOAD_IMAGES_AUTOMATICALLY, new Tizen.NUI.PropertyValue((bool)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            bool temp;
+            Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.LOAD_IMAGES_AUTOMATICALLY).Get(out temp);
+            return temp;
+        });
+
+        private static readonly BindableProperty DefaultTextEncodingNameProperty = BindableProperty.Create(nameof(DefaultTextEncodingName), typeof(string), typeof(WebView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.DEFAULT_TEXT_ENCODING_NAME, new Tizen.NUI.PropertyValue((string)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            string temp;
+            Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.DEFAULT_TEXT_ENCODING_NAME).Get(out temp);
+            return temp;
+        });
+
+        private static readonly BindableProperty DefaultFontSizeProperty = BindableProperty.Create(nameof(DefaultFontSize), typeof(int), typeof(WebView), 16, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var webview = (WebView)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(webview.swigCPtr, WebView.Property.DEFAULT_FONT_SIZE, new Tizen.NUI.PropertyValue((int)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var webview = (WebView)bindable;
+            int temp;
+            Tizen.NUI.Object.GetProperty(webview.swigCPtr, WebView.Property.DEFAULT_FONT_SIZE).Get(out temp);
+            return temp;
+        });
+
         /// <summary>
         /// Creates an uninitialized WebView.
         /// </summary>
@@ -143,98 +343,148 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal WebView Assign(WebView webView)
+        /// <summary>
+        /// The url to load.
+        /// </summary>
+        public string Url
         {
-            WebView ret = new WebView(Interop.WebView.WebView_Assign(swigCPtr, WebView.getCPtr(webView)), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            get
+            {
+                return (string)GetValue(UrlProperty);
+            }
+            set
+            {
+                SetValue(UrlProperty, value);
+                NotifyPropertyChanged();
+            }
         }
 
-        internal static WebView DownCast(BaseHandle handle)
+        /// <summary>
+        /// The cache model of the current WebView.
+        /// </summary>
+        public CacheModel CacheModel
         {
-            WebView ret = new WebView(Interop.WebView.WebView_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            get
+            {
+                return (CacheModel)GetValue(CacheModelProperty);
+            }
+            set
+            {
+                SetValue(CacheModelProperty, value);
+                NotifyPropertyChanged();
+            }
         }
 
         /// <summary>
-        /// Event arguments that passed via the webview signal.
+        /// The cookie acceptance policy.
         /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public class WebViewEventArgs : EventArgs
+        public CookieAcceptPolicy CookieAcceptPolicy
         {
-            private WebView _webView;
-            /// <summary>
-            /// The view for displaying webpages.
-            /// </summary>
-            [EditorBrowsable(EditorBrowsableState.Never)]
-            public WebView WebView
+            get
             {
-                get
-                {
-                    return _webView;
-                }
-                set
-                {
-                    _webView = value;
-                }
+                return (CookieAcceptPolicy)GetValue(CookieAcceptPolicyProperty);
             }
+            set
+            {
+                SetValue(CookieAcceptPolicyProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
 
-            private string _pageUrl;
-            /// <summary>
-            /// The url string of current webpage.
-            /// </summary>
-            [EditorBrowsable(EditorBrowsableState.Never)]
-            public string PageUrl
+        /// <summary>
+        /// The user agent string.
+        /// </summary>
+        public string UserAgent
+        {
+            get
             {
-                get
-                {
-                    return _pageUrl;
-                }
-                set
-                {
-                    _pageUrl = value;
-                }
+                return (string)GetValue(UserAgentProperty);
+            }
+            set
+            {
+                SetValue(UserAgentProperty, value);
+                NotifyPropertyChanged();
             }
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void WebViewCallbackDelegate(IntPtr data, string pageUrl);
+        /// <summary>
+        /// Whether JavaScript is enabled.
+        /// </summary>
+        public bool EnableJavaScript
+        {
+            get
+            {
+                return (bool)GetValue(EnableJavaScriptProperty);
+            }
+            set
+            {
+                SetValue(EnableJavaScriptProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
 
-        private void WebViewProxyConnect(global::System.Runtime.InteropServices.HandleRef proxy, System.Delegate func)
+        /// <summary>
+        /// Whether images can be loaded automatically.
+        /// </summary>
+        public bool LoadImagesAutomatically
         {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            get
+            {
+                return (bool)GetValue(LoadImagesAutomaticallyProperty);
+            }
+            set
             {
-                Interop.WebView.WebViewSignalProxy_Connect(proxy, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                SetValue(LoadImagesAutomaticallyProperty, value);
+                NotifyPropertyChanged();
             }
         }
 
-        private void WebViewProxyDisconnect(global::System.Runtime.InteropServices.HandleRef proxy, System.Delegate func)
+        /// <summary>
+        /// The default text encoding name.<br />
+        /// e.g. "UTF-8"<br />
+        /// </summary>
+        public string DefaultTextEncodingName
         {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            get
+            {
+                return (string)GetValue(DefaultTextEncodingNameProperty);
+            }
+            set
             {
-                Interop.WebView.WebViewSignalProxy_Disconnect(proxy, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                SetValue(DefaultTextEncodingNameProperty, value);
+                NotifyPropertyChanged();
             }
         }
 
-        private EventHandler<WebViewEventArgs> pageLoadStartedEventHandler;
-        private WebViewCallbackDelegate pageLoadStartedCallback;
+        /// <summary>
+        /// The default font size in pixel.
+        /// </summary>
+        public int DefaultFontSize
+        {
+            get
+            {
+                return (int)GetValue(DefaultFontSizeProperty);
+            }
+            set
+            {
+                SetValue(DefaultFontSizeProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
 
         /// <summary>
         /// Event for the PageLoadStarted signal which can be used to subscribe or unsubscribe the event handler.<br />
         /// This signal is emitted when page loading has started.<br />
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public event EventHandler<WebViewEventArgs> PageLoadStarted
+        public event EventHandler<WebViewPageLoadEventArgs> PageLoadStarted
         {
             add
             {
                 if (pageLoadStartedEventHandler == null)
                 {
                     pageLoadStartedCallback = (OnPageLoadStarted);
-                    WebViewProxyConnect(pageLoadStartedSignalProxy, pageLoadStartedCallback);
+                    pageLoadStartedSignal.Connect(pageLoadStartedCallback);
                 }
                 pageLoadStartedEventHandler += value;
             }
@@ -243,40 +493,24 @@ namespace Tizen.NUI
                 pageLoadStartedEventHandler -= value;
                 if (pageLoadStartedEventHandler == null && pageLoadStartedCallback != null)
                 {
-                    WebViewProxyDisconnect(pageLoadStartedSignalProxy, pageLoadStartedCallback);
+                    pageLoadStartedSignal.Disconnect(pageLoadStartedCallback);
                 }
             }
         }
 
-        private void OnPageLoadStarted(IntPtr data, string pageUrl)
-        {
-            WebViewEventArgs e = new WebViewEventArgs();
-
-            e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
-            e.PageUrl = pageUrl;
-
-            if (pageLoadStartedEventHandler != null)
-            {
-                pageLoadStartedEventHandler(this, e);
-            }
-        }
-
-        private EventHandler<WebViewEventArgs> pageLoadFinishedEventHandler;
-        private WebViewCallbackDelegate pageLoadFinishedCallback;
-
         /// <summary>
         /// Event for the PageLoadFinished signal which can be used to subscribe or unsubscribe the event handler.<br />
         /// This signal is emitted when page loading has finished.<br />
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public event EventHandler<WebViewEventArgs> PageLoadFinished
+        public event EventHandler<WebViewPageLoadEventArgs> PageLoadFinished
         {
             add
             {
                 if (pageLoadFinishedEventHandler == null)
                 {
                     pageLoadFinishedCallback = (OnPageLoadFinished);
-                    WebViewProxyConnect(pageLoadFinishedSignalProxy, pageLoadFinishedCallback);
+                    pageLoadFinishedSignal.Connect(pageLoadFinishedCallback);
                 }
                 pageLoadFinishedEventHandler += value;
             }
@@ -285,21 +519,34 @@ namespace Tizen.NUI
                 pageLoadFinishedEventHandler -= value;
                 if (pageLoadFinishedEventHandler == null && pageLoadFinishedCallback != null)
                 {
-                    WebViewProxyDisconnect(pageLoadFinishedSignalProxy, pageLoadFinishedCallback);
+                    pageLoadFinishedSignal.Disconnect(pageLoadFinishedCallback);
                 }
             }
         }
 
-        private void OnPageLoadFinished(IntPtr data, string pageUrl)
+        /// <summary>
+        /// Event for the PageLoadError signal which can be used to subscribe or unsubscribe the event handler.<br />
+        /// This signal is emitted when there's an error in page loading.<br />
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<WebViewPageLoadErrorEventArgs> PageLoadError
         {
-            WebViewEventArgs e = new WebViewEventArgs();
-
-            e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
-            e.PageUrl = pageUrl;
-
-            if (pageLoadFinishedEventHandler != null)
+            add
             {
-                pageLoadFinishedEventHandler(this, e);
+                if (pageLoadErrorEventHandler == null)
+                {
+                    pageLoadErrorCallback = (OnPageLoadError);
+                    pageLoadErrorSignal.Connect(pageLoadErrorCallback);
+                }
+                pageLoadErrorEventHandler += value;
+            }
+            remove
+            {
+                pageLoadErrorEventHandler -= value;
+                if (pageLoadErrorEventHandler == null && pageLoadErrorCallback != null)
+                {
+                    pageLoadErrorSignal.Disconnect(pageLoadErrorCallback);
+                }
             }
         }
 
@@ -316,18 +563,6 @@ namespace Tizen.NUI
 
         /// <summary>
         /// Returns the URL of the Web
-        /// <returns>Url of string type</returns>
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public string GetUrl()
-        {
-            string url = Interop.WebView.WebView_GetUrl(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return url;
-        }
-
-        /// <summary>
-        /// Returns the URL of the Web
         /// <param name="data">The data of Web</param>
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -358,6 +593,26 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Suspends the operation.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Suspend()
+        {
+            Interop.WebView.WebView_Suspend(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Resumes the operation after calling Suspend()
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Resume()
+        {
+            Interop.WebView.WebView_Resume(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
         /// Goes to the back
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -402,24 +657,23 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// The callback function that is invoked when the message is received from the script.
+        /// </summary>
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public delegate void JavaScriptMessageHandler(string message);
+
+        /// <summary>
         /// Evaluates JavaScript code represented as a string.
         /// <param name="script">The JavaScript code</param>
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void EvaluateJavaScript(string script)
         {
-            Interop.WebView.WebView_EvaluateJavaScript(swigCPtr, script);
+            Interop.WebView.WebView_EvaluateJavaScript(swigCPtr, script, new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// The callback function that is invoked when the message is received from the script.
-        /// </summary>
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public delegate void JavaScriptMessageHandler(string message);
-
-
         // For rooting handlers
         internal Dictionary<string, JavaScriptMessageHandler> handlerRootMap = new Dictionary<string, JavaScriptMessageHandler>();
 
@@ -445,7 +699,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Clears the history of Web.
+        /// Clears the history of current WebView.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ClearHistory()
@@ -455,7 +709,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Clears the cache of Web.
+        /// Clears the cache of current WebView.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ClearCache()
@@ -463,5 +717,15 @@ namespace Tizen.NUI
             Interop.WebView.WebView_ClearCache(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
+
+        /// <summary>
+        /// Clears all the cookies of current WebView.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ClearCookies()
+        {
+            Interop.WebView.WebView_ClearCookies(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
     }
 }
diff --git a/src/Tizen.NUI/src/internal/WebViewPageLoadErrorEventArgs.cs b/src/Tizen.NUI/src/internal/WebViewPageLoadErrorEventArgs.cs
new file mode 100644 (file)
index 0000000..f335d8b
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+    /// <summary>
+    /// Event arguments that passed via the WebView.PageLoadError.
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class WebViewPageLoadErrorEventArgs : EventArgs
+    {
+        /// <summary>
+        /// Enumeration for the load error code
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum LoadErrorCode
+        {
+            /// <summary>
+            /// Unknown.
+            /// </summary>
+            Unknown,
+            /// <summary>
+            /// User canceled.
+            /// </summary>
+            Canceled,
+            /// <summary>
+            /// Can't show the page for this MIME type.
+            /// </summary>
+            CantSupportMimetype,
+            /// <summary>
+            /// File IO error.
+            /// </summary>
+            FailedFileIo,
+            /// <summary>
+            /// Cannot connect to the network.
+            /// </summary>
+            CantConnect,
+            /// <summary>
+            /// Fail to look up host from the DNS.
+            /// </summary>
+            CantLookupHost,
+            /// <summary>
+            /// Fail to SSL/TLS handshake.
+            /// </summary>
+            FailedTlsHandshake,
+            /// <summary>
+            /// Received certificate is invalid.
+            /// </summary>
+            InvalidCertificate,
+            /// <summary>
+            /// Connection timeout.
+            /// </summary>
+            RequestTimeout,
+            /// <summary>
+            /// Too many redirects.
+            /// </summary>
+            TooManyRedirects,
+            /// <summary>
+            /// Too many requests during this load.
+            /// </summary>
+            TooManyRequests,
+            /// <summary>
+            /// Malformed URL.
+            /// </summary>
+            BadUrl,
+            /// <summary>
+            /// Unsupported scheme.
+            /// </summary>
+            UnsupportedScheme,
+            /// <summary>
+            /// User authentication failed on the server.
+            /// </summary>
+            Authentication,
+            /// <summary>
+            /// Web server has an internal server error.
+            /// </summary>
+            InternalServer,
+        }
+
+        private WebView _webView;
+        /// <summary>
+        /// The view for displaying webpages.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public WebView WebView
+        {
+            get
+            {
+                return _webView;
+            }
+            set
+            {
+                _webView = value;
+            }
+        }
+
+        private string _pageUrl;
+        /// <summary>
+        /// The url string of current webpage.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string PageUrl
+        {
+            get
+            {
+                return _pageUrl;
+            }
+            set
+            {
+                _pageUrl = value;
+            }
+        }
+
+        private LoadErrorCode _errorCode;
+        /// <summary>
+        /// The code for the current error.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public LoadErrorCode ErrorCode
+        {
+            get
+            {
+                return _errorCode;
+            }
+            set
+            {
+                _errorCode = value;
+            }
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs b/src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs
new file mode 100644 (file)
index 0000000..8903feb
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+    internal class WebViewPageLoadErrorSignal : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebViewPageLoadErrorSignal obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        //A Flag to check who called Dispose(). (By User or DisposeQueue)
+        private bool isDisposeQueued;
+        //A Flat to check if it is already disposed.
+        protected bool disposed;
+
+        ~WebViewPageLoadErrorSignal()
+        {
+            if (!isDisposeQueued)
+            {
+                isDisposeQueued = true;
+                DisposeQueue.Instance.Add(this);
+            }
+        }
+
+        public void Dispose()
+        {
+            if (isDisposeQueued)
+            {
+                Dispose(false);
+            }
+            else
+            {
+                Dispose(true);
+                System.GC.SuppressFinalize(this);
+            }
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (disposing)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                Interop.WebView.delete_WebViewPageLoadErrorSignal(swigCPtr);
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+
+            disposed = true;
+        }
+
+        public void Connect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            {
+                Interop.WebView.WebViewPageLoadErrorSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                {
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+            }
+        }
+
+        public void Disconnect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+            {
+                Interop.WebView.WebViewPageLoadErrorSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                {
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+            }
+        }
+
+        public WebViewPageLoadErrorSignal(global::System.IntPtr cPtr)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+    }
+
+}
diff --git a/src/Tizen.NUI/src/internal/WebViewPageLoadEventArgs.cs b/src/Tizen.NUI/src/internal/WebViewPageLoadEventArgs.cs
new file mode 100644 (file)
index 0000000..0ebc7b2
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+    /// <summary>
+    /// Event arguments that passed via the WebView.PageLoadStarted or WebView.PageLoadFinished.
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class WebViewPageLoadEventArgs : EventArgs
+    {
+
+        private WebView _webView;
+        /// <summary>
+        /// The view for displaying webpages.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public WebView WebView
+        {
+            get
+            {
+                return _webView;
+            }
+            set
+            {
+                _webView = value;
+            }
+        }
+
+        private string _pageUrl;
+        /// <summary>
+        /// The url string of current webpage.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string PageUrl
+        {
+            get
+            {
+                return _pageUrl;
+            }
+            set
+            {
+                _pageUrl = value;
+            }
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs b/src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs
new file mode 100644 (file)
index 0000000..f7da87f
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+    internal class WebViewPageLoadSignal : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebViewPageLoadSignal obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        //A Flag to check who called Dispose(). (By User or DisposeQueue)
+        private bool isDisposeQueued;
+        //A Flat to check if it is already disposed.
+        protected bool disposed;
+
+        ~WebViewPageLoadSignal()
+        {
+            if (!isDisposeQueued)
+            {
+                isDisposeQueued = true;
+                DisposeQueue.Instance.Add(this);
+            }
+        }
+
+        public void Dispose()
+        {
+            if (isDisposeQueued)
+            {
+                Dispose(false);
+            }
+            else
+            {
+                Dispose(true);
+                System.GC.SuppressFinalize(this);
+            }
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (disposing)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                Interop.WebView.delete_WebViewPageLoadSignal(swigCPtr);
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+
+            disposed = true;
+        }
+
+        public void Connect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+            {
+                Interop.WebView.WebViewPageLoadSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                {
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+            }
+        }
+
+        public void Disconnect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+            {
+                Interop.WebView.WebViewPageLoadSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                {
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+            }
+        }
+
+        public WebViewPageLoadSignal(global::System.IntPtr cPtr)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+    }
+
+}
index 542cdd7..9e2e0de 100755 (executable)
@@ -2818,4 +2818,44 @@ namespace Tizen.NUI
             }
         }
     }
+
+    /// <summary>
+    /// Enumeration for setting cache model of a WebView.
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public enum CacheModel
+    {
+        /// <summary>
+        /// Use the smallest cache capacity.
+        /// </summary>
+        DocumentViewer,
+        /// <summary>
+        /// Use the bigger cache capacity than DocumentBrowser.
+        /// </summary>
+        DocumentBrowser,
+        /// <summary>
+        /// Use the biggest cache capacity.
+        /// </summary>
+        PrimaryWebBrowser
+    }
+
+    /// <summary>
+    /// Enumeration for setting cache model of a WebView.
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public enum CookieAcceptPolicy
+    {
+        /// <summary>
+        /// Accepts every cookie sent from any page.
+        /// </summary>
+        Always,
+        /// <summary>
+        /// Rejects all the cookies.
+        /// </summary>
+        Never,
+        /// <summary>
+        /// Accepts only cookies set by the main document that is loaded.
+        /// </summary>
+        NoThirdParty
+    }
 }