[NUI] Rename some properties of WebView, WebSettings, etc. (#2944)
authorhuayongxu <49056704+huayongxu@users.noreply.github.com>
Thu, 22 Apr 2021 06:07:36 +0000 (14:07 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 28 Apr 2021 03:36:30 +0000 (12:36 +0900)
This patch is to raname some properties to follow naming rule.

src/Tizen.NUI/src/internal/WebView/WebContext.cs
src/Tizen.NUI/src/internal/WebView/WebCookieManager.cs
src/Tizen.NUI/src/internal/WebView/WebSettings.cs
src/Tizen.NUI/src/internal/WebView/WebView.cs
src/Tizen.NUI/src/internal/WebView/WebViewUrlChangedEventArgs.cs

index b6d578b..0e10227 100755 (executable)
@@ -27,7 +27,7 @@ namespace Tizen.NUI
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class WebContext : Disposable
     {
-        private string proxyUri;
+        private string proxyUrl;
         private string appId;
         private string appVersion;
         private float timeOffset;
@@ -158,28 +158,28 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set the proxy uri.
+        /// Proxy url.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Uri ProxyUri
+        public string ProxyUrl
         {
             get
             {
-                return new Uri(proxyUri);
+                return proxyUrl;
             }
             set
             {
                 if (value != null)
                 {
-                    Interop.WebContext.SetProxyUri(SwigCPtr, proxyUri);
+                    Interop.WebContext.SetProxyUri(SwigCPtr, value);
                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                    proxyUri = value.AbsoluteUri;
+                    proxyUrl = value;
                 }
             }
         }
 
         /// <summary>
-        /// Set the Certificate File Path.
+        /// Certificate file path.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public string CertificateFilePath
@@ -196,7 +196,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Disable cache or not.
+        /// Enables cache or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool CacheEnabled
@@ -213,7 +213,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set context app id.
+        /// App id.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public string AppId
@@ -231,7 +231,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set context app version.
+        /// App version.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public string AppVersion
@@ -249,7 +249,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set context app type.
+        /// App type.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public ApplicationType AppType
@@ -267,7 +267,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set context time offset.
+        /// Time offset.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public float TimeOffset
@@ -302,7 +302,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Get context proxy.
+        /// Gets context proxy.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public string ContextProxy
@@ -314,7 +314,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// get proxy bypass rule.
+        /// Gets proxy bypass rule.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public string ProxyBypassRule
@@ -326,7 +326,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set Default Proxy Auth.
+        /// Sets default proxy auth.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetDefaultProxyAuth(string username, string password)
@@ -336,7 +336,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete all web database.
+        /// Deletes all web database.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DeleteAllWebDatabase()
@@ -400,7 +400,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete all web storage.
+        /// Deletes all web storage.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DeleteAllWebStorage()
@@ -422,7 +422,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete local fileSystem.
+        /// Deletes local fileSystem.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DeleteLocalFileSystem()
@@ -432,7 +432,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Clear cache.
+        /// Clears cache.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ClearCache()
@@ -491,7 +491,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set context time zone offset.
+        /// Sets context time zone offset.
         /// <param name="offset">Time offset</param>
         /// <param name="time">Daylight saving time</param>
         /// </summary>
@@ -503,7 +503,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Register url schemes enabled.
+        /// Registers url schemes enabled.
         /// <param name="strArray">The string array of schemes</param>
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -517,7 +517,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Register js plugin mime types.
+        /// Registers js plugin mime types.
         /// <param name="strArray">The string array of types</param>
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -531,7 +531,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete all application cache.
+        /// Deletes all application cache.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool DeleteAllApplicationCache()
@@ -542,7 +542,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete all web indexed database.
+        /// Deletes all web indexed database.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool DeleteAllWebIndexedDatabase()
@@ -553,7 +553,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete password dataList.
+        /// Deletes password dataList.
         /// <param name="strArray">The string array of dataList</param>
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -567,7 +567,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete all password data.
+        /// Deletes all password data.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DeleteAllFormPasswordData()
@@ -577,7 +577,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Delete all candidate data.
+        /// Deletes all candidate data.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DeleteAllFormCandidateData()
@@ -587,7 +587,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set context proxy.
+        /// Sets context proxy.
         /// <param name="proxy">The string array of dataList</param>
         /// <param name="rule">Bypass rule</param>
         /// </summary>
@@ -599,7 +599,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Free unused memory.
+        /// Frees unused memory.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool FreeUnusedMemory()
index cd2df41..f41eec1 100755 (executable)
@@ -60,7 +60,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Cookie Accept Policy
+        /// Enumeration for cookie accept policy
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public enum CookieAcceptPolicyType
@@ -85,7 +85,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Cookie persistent storage type.
+        /// Enumeration for cookie persistent storage type.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public enum CookiePersistentStorageType
@@ -120,7 +120,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set the proxy uri.
+        /// Sets the proxy uri.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetPersistentStorage(string path, CookiePersistentStorageType storageType)
@@ -130,7 +130,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Set Default Proxy Auth.
+        /// Clears cookies.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ClearCookies()
index 0de29b6..4b5cccc 100755 (executable)
@@ -25,14 +25,14 @@ namespace Tizen.NUI
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class WebSettings : Disposable
     {
-        private bool allowMixedContents;
-        private bool enableSpatialNavigation;
-        private bool enableWebSecurity;
-        private bool enableCacheBuilder;
-        private bool enableDoNotTrack;
-        private bool allowFileAccessFromExternalUrl;
-        private bool allowScriptsOpenWindows;
-        private bool useScrollbarThumbFocusNotifications;
+        private bool mixedContentsAllowed;
+        private bool spatialNavigationEnabled;
+        private bool webSecurityEnabled;
+        private bool cacheBuilderEnabled;
+        private bool doNotTrackEnabled;
+        private bool fileAccessFromExternalUrlAllowed;
+        private bool scriptsOpenWindowsAllowed;
+        private bool scrollbarThumbFocusNotificationsUsed;
         private bool viewportMetaTag;
 
         internal WebSettings(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
@@ -40,38 +40,38 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Allow Mixed Contents
+        /// Allows mixed contents or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool AllowMixedContents
+        public bool MixedContentsAllowed
         {
             get
             {
-                return allowMixedContents;
+                return mixedContentsAllowed;
             }
             set
             {
                 Interop.WebSettings.AllowMixedContents(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                allowMixedContents = value;
+                mixedContentsAllowed = value;
             }
         }
 
         /// <summary>
-        /// Enable Spatial Navigation.
+        /// Enables spatial navigation or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool EnableSpatialNavigation
+        public bool SpatialNavigationEnabled
         {
             get
             {
-                return enableSpatialNavigation;
+                return spatialNavigationEnabled;
             }
             set
             {
                 Interop.WebSettings.EnableSpatialNavigation(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                enableSpatialNavigation = value;
+                spatialNavigationEnabled = value;
             }
         }
 
@@ -93,20 +93,20 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Enable web security.
+        /// Enables web security or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool EnableWebSecurity
+        public bool WebSecurityEnabled
         {
             get
             {
-                return enableWebSecurity;
+                return webSecurityEnabled;
             }
             set
             {
                 Interop.WebSettings.EnableWebSecurity(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                enableWebSecurity = value;
+                webSecurityEnabled = value;
             }
         }
 
@@ -118,13 +118,13 @@ namespace Tizen.NUI
         {
             get 
             {
-                return enableCacheBuilder;
+                return cacheBuilderEnabled;
             }
             set 
             {
                 Interop.WebSettings.EnableCacheBuilder(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                enableCacheBuilder = value;
+                cacheBuilderEnabled = value;
             }
         }
 
@@ -135,13 +135,13 @@ namespace Tizen.NUI
         {
             get
             {
-                return enableDoNotTrack;
+                return doNotTrackEnabled;
             }
             set
             {
                 Interop.WebSettings.EnableDoNotTrack(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                enableDoNotTrack = value;
+                doNotTrackEnabled = value;
             }
         }
 
@@ -153,39 +153,39 @@ namespace Tizen.NUI
         {
             get
             {
-                return useScrollbarThumbFocusNotifications;
+                return scrollbarThumbFocusNotificationsUsed;
             }
             set
             {
                 Interop.WebSettings.UseScrollbarThumbFocusNotifications(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                useScrollbarThumbFocusNotifications = value;
+                scrollbarThumbFocusNotificationsUsed = value;
             }
         }
 
         /// <summary>
-        /// Allow File Access From External Url.
+        /// Allows file access from external url or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool AllowFileAccessFromExternalUrl
+        public bool FileAccessFromExternalUrlAllowed
         {
             get
             {
-                return allowFileAccessFromExternalUrl;
+                return fileAccessFromExternalUrlAllowed;
             }
             set
             {
                 Interop.WebSettings.AllowFileAccessFromExternalUrl(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                allowFileAccessFromExternalUrl = value;
+                fileAccessFromExternalUrlAllowed = value;
             }
         }
 
         /// <summary>
-        /// Enable JavaScript.
+        /// Enables JavaScript or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool EnableJavaScript
+        public bool JavaScriptEnabled
         {
             get
             {
@@ -403,28 +403,28 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Allow Scripts Open Windows.
+        /// Allows scripts open windows or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool AllowScriptsOpenWindows
+        public bool ScriptsOpenWindowsAllowed
         {
             get
             {
-                return allowScriptsOpenWindows;
+                return scriptsOpenWindowsAllowed;
             }
             set
             {
                 Interop.WebSettings.AllowScriptsOpenWindows(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                allowScriptsOpenWindows = value;
+                scriptsOpenWindowsAllowed = value;
             }
         }
 
         /// <summary>
-        /// Allow Images Load Automatically.
+        /// Allow images load automatically or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool AllowImagesLoadAutomatically
+        public bool AutomaticImageLoadingAllowed
         {
             get
             {
@@ -438,7 +438,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Default Text Encoding Name.
+        /// Default text encoding name.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public string DefaultTextEncodingName
index fc5b729..7f1175d 100755 (executable)
@@ -165,7 +165,7 @@ namespace Tizen.NUI
             contextMenuItemSelectedSignal = new WebViewContextMenuItemSelectedSignal(Interop.WebView.NewWebViewContextMenuItemSelectedSignalContextMenuItemSelected(SwigCPtr));
 
             screenshotAcquiredProxyCallback = OnScreenshotAcquired;
-            hitTestFinishedProxyCallback = OnHitTestCreated;
+            hitTestFinishedProxyCallback = OnHitTestFinished;
 
             BackForwardList = new WebBackForwardList(Interop.WebView.GetWebBackForwardList(SwigCPtr), false);
             Context = new WebContext(Interop.WebView.GetWebContext(SwigCPtr), false);
@@ -273,7 +273,7 @@ namespace Tizen.NUI
         public delegate void GeolocationPermissionCallback(string host, string protocol);
 
         /// <summary>
-        /// The callback function that is invoked when hit test is created.
+        /// The callback function that is invoked when hit test is finished.
         /// </summary>
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -930,11 +930,11 @@ namespace Tizen.NUI
         {
             get
             {
-                return Settings.EnableJavaScript;
+                return Settings.JavaScriptEnabled;
             }
             set
             {
-                Settings.EnableJavaScript = value;
+                Settings.JavaScriptEnabled = value;
             }
         }
 
@@ -946,11 +946,11 @@ namespace Tizen.NUI
         {
             get
             {
-                return Settings.AllowImagesLoadAutomatically;
+                return Settings.AutomaticImageLoadingAllowed;
             }
             set
             {
-                Settings.AllowImagesLoadAutomatically = value;
+                Settings.AutomaticImageLoadingAllowed = value;
             }
         }
 
@@ -2144,7 +2144,7 @@ namespace Tizen.NUI
             contextMenuItemSelectedEventHandler?.Invoke(this, new WebViewContextMenuItemSelectedEventArgs(new WebContextMenuItem(item, false)));
         }
 
-        private void OnHitTestCreated(IntPtr test)
+        private void OnHitTestFinished(IntPtr test)
         {
             WebHitTestResult hitTest = new WebHitTestResult(test, true);
             hitTestFinishedCallback?.Invoke(hitTest);
index 9ad964d..be569b9 100755 (executable)
@@ -28,13 +28,13 @@ namespace Tizen.NUI
     {
         internal WebViewUrlChangedEventArgs(string url)
         {
-            NewPageUri = new Uri(url);
+            NewPageUrl = url;
         }
 
         /// <summary>
-        /// The uri of new web page.
+        /// The url of new web page.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Uri NewPageUri { get; }
+        public string NewPageUrl { get; }
     }
 }