change GetXXX to XXX
authorhuayong.xu <huayong.xu@samsung.com>
Tue, 13 Apr 2021 09:10:30 +0000 (17:10 +0800)
committerhuiyueun <35286162+huiyueun@users.noreply.github.com>
Tue, 20 Apr 2021 06:13:00 +0000 (15:13 +0900)
src/Tizen.NUI/src/internal/WebView/WebFrame.cs
src/Tizen.NUI/src/internal/WebView/WebNewWindowPolicyDecisionMaker.cs
src/Tizen.NUI/src/internal/WebView/WebView.cs

index fe0cb0b..ada7c2e 100755 (executable)
@@ -33,11 +33,12 @@ namespace Tizen.NUI
         /// Checks whether the frame is main frame or not.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool IsMainFrame()
+        public bool IsMainFrame
         {
-            bool result = Interop.WebFrame.IsMainFrame(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return Interop.WebFrame.IsMainFrame(SwigCPtr);
+            }
         }
     }
 }
index 602e7f0..866638e 100755 (executable)
@@ -37,19 +37,19 @@ namespace Tizen.NUI
         public enum DecisionType
         {
             /// <summary>
-            /// Use
+            /// Accepts the decision.
             /// </summary>
             [EditorBrowsable(EditorBrowsableState.Never)]
             Use,
 
             /// <summary>
-            /// Download
+            /// Decides to download something.
             /// </summary>
             [EditorBrowsable(EditorBrowsableState.Never)]
             Download,
 
             /// <summary>
-            /// Ignore
+            /// Ignores the decision.
             /// </summary>
             [EditorBrowsable(EditorBrowsableState.Never)]
             Ignore,
@@ -102,88 +102,97 @@ namespace Tizen.NUI
         /// Gets the url that request policy decision.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Uri GetUrl()
+        public string Url
         {
-            string result = Interop.WebNewWindowPolicyDecisionMaker.GetUrl(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return new Uri(result);
+            get
+            {
+                return Interop.WebNewWindowPolicyDecisionMaker.GetUrl(SwigCPtr);
+            }
         }
 
         /// <summary>
         /// Gets a cookie that web page has.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public string GetCookie()
+        public string Cookie
         {
-            string result = Interop.WebNewWindowPolicyDecisionMaker.GetCookie(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return Interop.WebNewWindowPolicyDecisionMaker.GetCookie(SwigCPtr);
+            }
         }
 
         /// <summary>
         /// Gets a decision type.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public DecisionType GetDecisionType()
+        public DecisionType PolicyDecisionType
         {
-            DecisionType result = (DecisionType)Interop.WebNewWindowPolicyDecisionMaker.GetDecisionType(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return (DecisionType)Interop.WebNewWindowPolicyDecisionMaker.GetDecisionType(SwigCPtr);
+            }
         }
 
         /// <summary>
         /// Gets a MIME type for response data.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public string GetResponseMime()
+        public string ResponseMime
         {
-            string result = Interop.WebNewWindowPolicyDecisionMaker.GetResponseMime(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return Interop.WebNewWindowPolicyDecisionMaker.GetResponseMime(SwigCPtr);
+            }
         }
 
         /// <summary>
         /// Gets a HTTP status code.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public int GetResponseStatusCode()
+        public int ResponseStatusCode
         {
-            int result = Interop.WebNewWindowPolicyDecisionMaker.GetResponseStatusCode(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return Interop.WebNewWindowPolicyDecisionMaker.GetResponseStatusCode(SwigCPtr);
+            }
         }
 
         /// <summary>
         /// Gets a navigation type.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public NavigationType GetNavigationType()
+        public NavigationType DecisionNavigationType
         {
-            NavigationType result = (NavigationType)Interop.WebNewWindowPolicyDecisionMaker.GetNavigationType(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return (NavigationType)Interop.WebNewWindowPolicyDecisionMaker.GetNavigationType(SwigCPtr);
+            }
         }
 
         /// <summary>
         /// Gets frame of web view.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public WebFrame GetFrame()
+        public WebFrame Frame
         {
-            IntPtr result = Interop.WebNewWindowPolicyDecisionMaker.GetFrame(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return new WebFrame(result, false);
+            get
+            {
+                IntPtr result = Interop.WebNewWindowPolicyDecisionMaker.GetFrame(SwigCPtr);
+                return new WebFrame(result, false);
+            }
         }
 
         /// <summary>
         /// Gets a scheme.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public string GetScheme()
+        public string Scheme
         {
-            string result = Interop.WebNewWindowPolicyDecisionMaker.GetScheme(SwigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return result;
+            get
+            {
+                return Interop.WebNewWindowPolicyDecisionMaker.GetScheme(SwigCPtr);
+            }
         }
 
         /// <summary>
index 062166c..400ee01 100755 (executable)
@@ -451,6 +451,32 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Event for the NewWindowPolicyDecided signal which can be used to subscribe or unsubscribe the event handler.<br />
+        /// This signal is emitted when new window policy would be decided.<br />
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<WebViewNewWindowPolicyDecidedEventArgs> NewWindowPolicyDecided
+        {
+            add
+            {
+                if (newWindowPolicyDecidedEventHandler == null)
+                {
+                    newWindowPolicyDecidedCallback = OnNewWindowPolicyDecided;
+                    newWindowPolicyDecidedSignal.Connect(newWindowPolicyDecidedCallback);
+                }
+                newWindowPolicyDecidedEventHandler += value;
+            }
+            remove
+            {
+                newWindowPolicyDecidedEventHandler -= value;
+                if (newWindowPolicyDecidedEventHandler == null && newWindowPolicyDecidedCallback != null)
+                {
+                    newWindowPolicyDecidedSignal.Disconnect(newWindowPolicyDecidedCallback);
+                }
+            }
+        }
+
+        /// <summary>
         /// Options for searching texts.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -511,31 +537,6 @@ namespace Tizen.NUI
             ShowHighlight = 1 << 7,
         }
 
-        /// Event for the NewWindowPolicyDecided signal which can be used to subscribe or unsubscribe the event handler.<br />
-        /// This signal is emitted when new window policy would be decided.<br />
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public event EventHandler<WebViewNewWindowPolicyDecidedEventArgs> NewWindowPolicyDecided
-        {
-            add
-            {
-                if (newWindowPolicyDecidedEventHandler == null)
-                {
-                    newWindowPolicyDecidedCallback = OnNewWindowPolicyDecided;
-                    newWindowPolicyDecidedSignal.Connect(newWindowPolicyDecidedCallback);
-                }
-                newWindowPolicyDecidedEventHandler += value;
-            }
-            remove
-            {
-                newWindowPolicyDecidedEventHandler -= value;
-                if (newWindowPolicyDecidedEventHandler == null && newWindowPolicyDecidedCallback != null)
-                {
-                    newWindowPolicyDecidedSignal.Disconnect(newWindowPolicyDecidedCallback);
-                }
-            }
-        }
-
         /// <summary>
         /// BackForwardList.
         /// </summary>
@@ -1798,9 +1799,7 @@ namespace Tizen.NUI
 
         private void OnNewWindowPolicyDecided(IntPtr data, IntPtr maker)
         {
-            WebNewWindowPolicyDecisionMaker decisionMaker = new WebNewWindowPolicyDecisionMaker(maker, false);
-            newWindowPolicyDecidedEventHandler?.Invoke(this, new WebViewNewWindowPolicyDecidedEventArgs(decisionMaker));
-            decisionMaker.Dispose();
+            newWindowPolicyDecidedEventHandler?.Invoke(this, new WebViewNewWindowPolicyDecidedEventArgs(new WebNewWindowPolicyDecisionMaker(maker, false)));
         }
     }
 }