[Tizen] Add a WebView API for notifying orientation change accepted/tizen/unified/20240821.165321 accepted/tizen/unified/dev/20240822.230519 accepted/tizen/unified/x/20240822.014250
authorJiyun Yang <ji.yang@samsung.com>
Wed, 21 Aug 2024 04:23:14 +0000 (13:23 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Wed, 21 Aug 2024 04:25:28 +0000 (13:25 +0900)
This reverts commit e4a119f53659de1dccf8cc96fefdcd90f59d9ed6.

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 3b0f3b60653c9f435cefe3c48ae8fbfdaeb13918..422acfd1d016ced2d26bffae543a7092e4d9bbd9 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * 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.
@@ -84,6 +84,11 @@ WebView WebView::DownCast(BaseHandle handle)
   return Control::DownCast<WebView, Internal::WebView>(handle);
 }
 
+void WebView::ChangeOrientation(int orientation)
+{
+  return Dali::Toolkit::GetImpl(*this).ChangeOrientation(orientation);
+}
+
 Dali::Toolkit::WebSettings* WebView::GetSettings() const
 {
   return Dali::Toolkit::GetImpl(*this).GetSettings();
index 42b78bce420fa3c74b22ff1d213d440572a47630..7585bab85f65ed465518456665c165b717fc715a 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_WEB_VIEW_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * 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.
@@ -269,6 +269,11 @@ public:
    */
   static WebView DownCast(BaseHandle handle);
 
+  /**
+   * @brief Change orientation.
+   */
+  void ChangeOrientation(int orientation);
+
   /**
    * @brief Get WebSettings of WebEngine.
    */
index 233e1d04301ad01d8f37e2de60950d6726d67565..000647cf9914a00d1498c9d944c32ee26dfa567e 100644 (file)
@@ -340,6 +340,14 @@ void WebView::OnRelayout(const Vector2& size, RelayoutContainer& container)
   SetDisplayArea(displayArea);
 }
 
+void WebView::ChangeOrientation(int orientation)
+{
+  if(mWebEngine)
+  {
+    mWebEngine.ChangeOrientation(orientation);
+  }
+}
+
 Dali::Toolkit::WebSettings* WebView::GetSettings() const
 {
   return mWebSettings.get();
index aded7817a4f0dc2766db5f1f5d158e49a7527e6a..156c7234965ba083e26d7b69e8dfb31d36098da9 100644 (file)
@@ -87,6 +87,11 @@ public:
    */
   static Dali::WebEngineCookieManager* GetCookieManager();
 
+  /**
+   * @copydoc Dali::Toolkit::WebView::ChangeOrientation()
+   */
+  void ChangeOrientation(int orientation);
+
   /**
    * @copydoc Dali::Toolkit::WebView::GetSettings()
    */