[Tizen] Add WebAuthDisplayQR and Response for QR code passkey in WebView 33/317133/1
authordongsug.song <dongsug.song@samsung.com>
Wed, 4 Sep 2024 10:06:04 +0000 (19:06 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Wed, 4 Sep 2024 10:06:04 +0000 (19:06 +0900)
Change-Id: I85ab00b654952da5815ef66d870802c0ed38069a

dali-toolkit/devel-api/controls/web-view/web-view.cpp
dali-toolkit/devel-api/controls/web-view/web-view.h
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h

index 422acfd..639b1c8 100755 (executable)
@@ -444,6 +444,21 @@ void WebView::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceive
   Dali::Toolkit::GetImpl(*this).GetPlainTextAsynchronously(callback);
 }
 
+void WebView::WebAuthenticationCancel()
+{
+  Dali::Toolkit::GetImpl(*this).WebAuthenticationCancel();
+}
+
+void WebView::RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback)
+{
+  Dali::Toolkit::GetImpl(*this).RegisterWebAuthDisplayQRCallback(callback);
+}
+
+void WebView::RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback)
+{
+  Dali::Toolkit::GetImpl(*this).RegisterWebAuthResponseCallback(callback);
+}
+
 WebView::WebView(Internal::WebView& implementation)
 : Control(implementation)
 {
index 7585bab..e7be860 100755 (executable)
@@ -796,6 +796,25 @@ public:
    */
   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
 
+  /**
+   * @brief Cancel WebAuthentication(cancel in progress passkey operation).
+   */
+  void WebAuthenticationCancel();
+
+  /**
+   * @brief Register WebAuthDisplayQR callback.
+   *
+   * @param[in] callback The callback informs browser app to display QR code popup for passkey scenario.
+   */
+  void RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback);
+
+  /**
+   * @brief Register WebAuthResponse callback.
+   *
+   * @param[in] callback The callback informs browser app that the passkey registration and authentication has been successful and app can close QR popup.
+   */
+  void RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback);
+
 public: // Not intended for application developers
   /// @cond internal
   /**
index d2902e7..649761c 100755 (executable)
@@ -828,6 +828,30 @@ void WebView::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceive
   }
 }
 
+void WebView::WebAuthenticationCancel()
+{
+  if(mWebEngine)
+  {
+    mWebEngine.WebAuthenticationCancel();
+  }
+}
+
+void WebView::RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback)
+{
+  if(mWebEngine)
+  {
+    mWebEngine.RegisterWebAuthDisplayQRCallback(std::move(callback));
+  }
+}
+
+void WebView::RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback)
+{
+  if(mWebEngine)
+  {
+    mWebEngine.RegisterWebAuthResponseCallback(std::move(callback));
+  }
+}
+
 void WebView::OnFrameRendered()
 {
   if(mFrameRenderedCallback)
index 94e3f37..3acd431 100755 (executable)
@@ -443,6 +443,21 @@ public:
    */
   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
 
+  /**
+   * @copydoc Dali::Toolkit::WebView::WebAuthenticationCancel()
+   */
+  void WebAuthenticationCancel();
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterWebAuthDisplayQRCallback()
+   */
+  void RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterWebAuthResponseCallback()
+   */
+  void RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback);
+
 public: // Properties
   /**
    * @brief Called when a property of an object of this type is set.