From: dongsug.song Date: Mon, 9 Sep 2024 07:40:24 +0000 (+0900) Subject: [NUI] Revert "[NUI] Add WebAuthDisplayQR and Response for QR code passkey in WebView" X-Git-Tag: submit/tizen_7.0/20240909.075907~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfd89fc90ac582b1b40f0a1cf740c095a7050a13;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Revert "[NUI] Add WebAuthDisplayQR and Response for QR code passkey in WebView" This reverts commit 06d9c59788af846e5e6a3b3a2d1f7c0744acd2d2. - chromium web engine update is required - fix gbs build error : dali-extension/web-engine-chromium/tizen-web-engine-chromium.cpp:867:3: error: 'ewk_view_webauthn_cancel' was not declared in this scope [ 285s] 867 | ewk_view_webauthn_cancel(mWebView); [ 285s] | ^~~~~~~~~~~~~~~~~~~~~~~~ --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs index a13b71159..c35ad24d0 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs @@ -330,15 +330,6 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_GetPlainTextAsynchronously")] public static extern void GetPlainTextAsynchronously(global::System.Runtime.InteropServices.HandleRef webViewRef, global::System.Runtime.InteropServices.HandleRef callbackRef); - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_WebAuthenticationCancel")] - public static extern void WebAuthenticationCancel(global::System.Runtime.InteropServices.HandleRef webViewRef); - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_RegisterWebAuthDisplayQRCallback")] - public static extern void RegisterWebAuthDisplayQRCallback(global::System.Runtime.InteropServices.HandleRef webViewRef, global::System.Runtime.InteropServices.HandleRef callbackRef); - - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_RegisterWebAuthResponseCallback")] - public static extern void RegisterWebAuthResponseCallback(global::System.Runtime.InteropServices.HandleRef webViewRef, global::System.Runtime.InteropServices.HandleRef callbackRef); } } } diff --git a/src/Tizen.NUI/src/internal/WebView/WebViewWebAuthDisplayQREventArgs.cs b/src/Tizen.NUI/src/internal/WebView/WebViewWebAuthDisplayQREventArgs.cs deleted file mode 100755 index 4e7507b08..000000000 --- a/src/Tizen.NUI/src/internal/WebView/WebViewWebAuthDisplayQREventArgs.cs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2024 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 -{ - /// - /// Event arguments that passed via the WebView.WebAuthDisplayQR. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class WebViewWebAuthDisplayQREventArgs : EventArgs - { - internal WebViewWebAuthDisplayQREventArgs(string contents) - { - Contents = contents; - } - - /// - /// The string contents to make QR code image in user side. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public string Contents { get; } - } -} diff --git a/src/Tizen.NUI/src/public/WebView/WebView.cs b/src/Tizen.NUI/src/public/WebView/WebView.cs index c5a979ad2..ce0a3b6cc 100755 --- a/src/Tizen.NUI/src/public/WebView/WebView.cs +++ b/src/Tizen.NUI/src/public/WebView/WebView.cs @@ -105,12 +105,6 @@ namespace Tizen.NUI.BaseComponents private PlainTextReceivedCallback plainTextReceivedCallback; - private EventHandler webAuthDisplayQREventHandler; - private WebViewWebAuthDisplayQRCallback webAuthDisplayQRCallback; - - private EventHandler webAuthResponseEventHandler; - private WebViewWebAuthResponseCallback webAuthResponseCallback; - /// /// Creates a WebView. /// @@ -308,12 +302,6 @@ namespace Tizen.NUI.BaseComponents [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void WebViewTextFoundCallback(uint count); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - private delegate void WebViewWebAuthDisplayQRCallback(string contents); - - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - private delegate void WebViewWebAuthResponseCallback(); - /// /// Event for the PageLoadStarted signal which can be used to subscribe or unsubscribe the event handler.
/// This signal is emitted when page loading has started.
@@ -902,60 +890,6 @@ namespace Tizen.NUI.BaseComponents } } - /// - /// Event to informs user application to display QR code popup for passkey scenario. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler WebAuthDisplayQR - { - add - { - if (webAuthDisplayQREventHandler == null) - { - webAuthDisplayQRCallback = OnWebAuthDisplayQR; - IntPtr ip = Marshal.GetFunctionPointerForDelegate(webAuthDisplayQRCallback); - Interop.WebView.RegisterWebAuthDisplayQRCallback(SwigCPtr, new HandleRef(this, ip)); - } - webAuthDisplayQREventHandler += value; - } - remove - { - webAuthDisplayQREventHandler -= value; - if (webAuthDisplayQREventHandler == null) - { - IntPtr ip = IntPtr.Zero; - Interop.WebView.RegisterWebAuthDisplayQRCallback(SwigCPtr, new HandleRef(this, ip)); - } - } - } - - /// - /// Event to informs user application that the passkey registration and authentication has been successful. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler WebAuthResponse - { - add - { - if (webAuthResponseEventHandler == null) - { - webAuthResponseCallback = OnWebAuthResponse; - IntPtr ip = Marshal.GetFunctionPointerForDelegate(webAuthResponseCallback); - Interop.WebView.RegisterWebAuthResponseCallback(SwigCPtr, new HandleRef(this, ip)); - } - webAuthResponseEventHandler += value; - } - remove - { - webAuthResponseEventHandler -= value; - if (webAuthResponseEventHandler == null) - { - IntPtr ip = IntPtr.Zero; - Interop.WebView.RegisterWebAuthResponseCallback(SwigCPtr, new HandleRef(this, ip)); - } - } - } - /// /// Options for searching texts. /// @@ -2440,16 +2374,6 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// cancel in progress web authentication that is passkey operation. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public void WebAuthenticationCancel() - { - Interop.WebView.WebAuthenticationCancel(SwigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - internal static WebView DownCast(BaseHandle handle) { WebView ret = new WebView(Interop.WebView.DownCast(BaseHandle.getCPtr(handle)), true); @@ -2610,16 +2534,5 @@ namespace Tizen.NUI.BaseComponents { textFoundEventHandler?.Invoke(this, new WebViewTextFoundEventArgs(count)); } - - private void OnWebAuthDisplayQR(string contents) - { - webAuthDisplayQREventHandler?.Invoke(this, new WebViewWebAuthDisplayQREventArgs(contents)); - } - - private void OnWebAuthResponse() - { - webAuthResponseEventHandler?.Invoke(this, new EventArgs()); - } - } }