[Tizen] Add WebAuthDisplayQR and Response for QR code passkey 53/318953/1 accepted/tizen/7.0/unified/20241011.161428
authordongsug.song <dongsug.song@samsung.com>
Fri, 11 Oct 2024 07:20:00 +0000 (16:20 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Fri, 11 Oct 2024 07:20:00 +0000 (16:20 +0900)
Change-Id: I30ec7ab398a7577d13974bc29762c3e1c2ded622

dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h
dali/devel-api/adaptor-framework/web-engine/web-engine.cpp
dali/devel-api/adaptor-framework/web-engine/web-engine.h
dali/internal/web-engine/common/web-engine-impl.cpp
dali/internal/web-engine/common/web-engine-impl.h

index 7b344199632cab46ef2888018f1309506a1b44b6..5c8094891034df69b7f95de1492dace429f41cf6 100755 (executable)
@@ -200,6 +200,16 @@ public:
    */
   using PlainTextReceivedCallback = std::function<void(const std::string&)>;
 
+  /**
+   * @brief WebView callback informs browser app to display QB code popup for passkey scenario.
+   */
+  using WebEngineWebAuthDisplayQRCallback = std::function<void(const std::string&)>;
+
+  /**
+   * @brief WebView callback informs browser app that the passkey registration and authentication has been successful and app can close QR popup.
+   */
+  using WebEngineWebAuthResponseCallback = std::function<void(void)>;
+
   /**
    * @brief Enumeration for the scroll edge.
    */
@@ -939,6 +949,26 @@ public:
    * @param[in] callback The callback function called asynchronously.
    */
   virtual void GetPlainTextAsynchronously(PlainTextReceivedCallback callback) = 0;
+
+  /**
+   * @brief Cancel WebAuthentication(cancel in progress passkey operation).
+   */
+  virtual void WebAuthenticationCancel() = 0;
+
+  /**
+   * @brief Register WebAuthDisplayQR callback.
+   *
+   * @param[in] callback The callback informs browser app to display QR code popup for passkey scenario.
+   */
+  virtual void RegisterWebAuthDisplayQRCallback(WebEngineWebAuthDisplayQRCallback callback) = 0;
+
+  /**
+   * @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.
+   */
+  virtual void RegisterWebAuthResponseCallback(WebEngineWebAuthResponseCallback callback) = 0;
+
 };
 
 // specialization has to be done in the same namespace
index 4d8fb89299165588452c18f7f7c5f42508d26b76..6a7e5c350a2b34943157403acc73025f2bc50709 100755 (executable)
@@ -600,4 +600,19 @@ void WebEngine::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextRecei
   GetImplementation(*this).GetPlainTextAsynchronously(callback);
 }
 
+void WebEngine::WebAuthenticationCancel()
+{
+  GetImplementation(*this).WebAuthenticationCancel();
+}
+
+void WebEngine::RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback)
+{
+  GetImplementation(*this).RegisterWebAuthDisplayQRCallback(callback);
+}
+
+void WebEngine::RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback)
+{
+  GetImplementation(*this).RegisterWebAuthResponseCallback(callback);
+}
+
 } // namespace Dali
index bb62795db8142a3b8217ae0db6e013595aa2f6fd..aa96f3c21c195f1c66a8df58841a7ccaeedbe0df 100755 (executable)
@@ -825,6 +825,27 @@ public:
    */
   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
 
+  /**
+   * @brief Cancel WebAuthentication(cancel in progress passkey operation).
+   */
+  void WebAuthenticationCancel();
+
+  /**
+   * @brief Get a plain text of current web page asynchronously.
+   *
+   * @param[in] callback The callback function called asynchronously.
+
+   */
+  void RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback);
+
+  /**
+   * @brief Get a plain text of current web page asynchronously.
+   *
+   * @param[in] callback The callback function called asynchronously.
+
+   */
+  void RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback);
+
 private: // Not intended for application developers
   /**
    * @brief Internal constructor
index 2b557f1fae541561c6410c223665f4efa091e835..033aa7642d1ccd008f976d17022e83b6202772b4 100644 (file)
@@ -810,6 +810,21 @@ void WebEngine::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextRecei
   mPlugin->GetPlainTextAsynchronously(callback);
 }
 
+void WebEngine::WebAuthenticationCancel()
+{
+  mPlugin->WebAuthenticationCancel();
+}
+
+void WebEngine::RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback)
+{
+  mPlugin->RegisterWebAuthDisplayQRCallback(callback);
+}
+
+void WebEngine::RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback)
+{
+  mPlugin->RegisterWebAuthResponseCallback(callback);
+}
+
 } // namespace Adaptor
 } // namespace Internal
 } // namespace Dali
index e356133174d2f093985c69c4d4451ffbbfb53e8d..d8afbceb1f5909b88cf83400ddde4003b0d1aebd 100755 (executable)
@@ -587,6 +587,21 @@ public:
    */
   void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
 
+  /**
+   * @copydoc Dali::WebEngine::WebAuthenticationCancel()
+   */
+  void WebAuthenticationCancel();
+
+  /**
+   * @copydoc Dali::WebEngine::RegisterWebAuthDisplayQRCallback()
+   */
+  void RegisterWebAuthDisplayQRCallback(Dali::WebEnginePlugin::WebEngineWebAuthDisplayQRCallback callback);
+
+  /**
+   * @copydoc Dali::WebEngine::RegisterWebAuthResponseCallback()
+   */
+  void RegisterWebAuthResponseCallback(Dali::WebEnginePlugin::WebEngineWebAuthResponseCallback callback);
+
 private:
   /**
    * @brief Constructor.