Use c-style string when webview loads contents.
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine / web-engine.h
index cdc5b21..1515c76 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_WEB_ENGINE_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -28,6 +28,9 @@
 
 namespace Dali
 {
+class WebEngineContext;
+class WebEngineCookieManager;
+
 namespace Internal
 {
 namespace Adaptor
@@ -87,6 +90,21 @@ public:
   WebEngine& operator=(const WebEngine& WebEngine);
 
   /**
+   * @brief Move constructor.
+   *
+   * @param[in] WebEngine WebEngine to move. The moved WebEngine will point at the same implementation
+   */
+  WebEngine(WebEngine&& WebEngine);
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @param[in] WebEngine The WebEngine to assign from.
+   * @return The updated WebEngine.
+   */
+  WebEngine& operator=(WebEngine&& WebEngine);
+
+  /**
    * @brief Downcast a handle to WebEngine handle.
    *
    * If handle points to a WebEngine the downcast produces valid
@@ -197,7 +215,7 @@ public:
    *
    * @return true if successfully request, false otherwise
    */
-  bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
+  bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
 
   /**
    * @brief Reload the Web.
@@ -644,11 +662,11 @@ public:
   bool SendWheelEvent(const WheelEvent& event);
 
   /**
-   * @brief Connect to this signal to be notified when frame is rendered.
+   * @brief Callback to be called when frame would be rendered.
    *
-   * @return A signal object to connect with.
+   * @param[in] callback
    */
-  Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal();
+  void RegisterFrameRenderedCallback(Dali::WebEnginePlugin::WebEngineFrameRenderedCallback callback);
 
   /**
    * @brief Callback to be called when page loading is started.
@@ -721,6 +739,13 @@ public:
   void RegisterNavigationPolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineNavigationPolicyDecidedCallback callback);
 
   /**
+   * @brief Callback to be called when a new window would be created.
+   *
+   * @param[in] callback
+   */
+  void RegisterNewWindowCreatedCallback(Dali::WebEnginePlugin::WebEngineNewWindowCreatedCallback callback);
+
+  /**
    * @brief Callback to be called when certificate need be confirmed.
    *
    * @param[in] callback