[Tizen] Add a WebView API for notifying orientation change. 16/305516/1
authorhuayong.xu <huayong.xu@samsung.com>
Fri, 2 Feb 2024 06:54:15 +0000 (14:54 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Fri, 2 Feb 2024 06:57:57 +0000 (14:57 +0800)
Change-Id: I74d7f99e28b4a681f918a45a109bc25d7a46371b

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 63d9cca0231037d5beaf96232f7203f91aa3633b..76af06ca7ebe06963e7023431cf464815dab780c 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 0ee8af7449dc4b00d0e8f223b7299ace23be1c97..274676acf90e6350621a937ba78c87c3adda0160 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 696b8e2dd80ecc852ee36a8eb67595fc5bc6fbde..ffafdca589317978ec6cab2610f11c522859fe70 100644 (file)
@@ -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.
@@ -316,6 +316,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 5cf24e549be76a309310c5e7eaec5ae958ee76b4..8e727d6b555d3dcb54b9fbb67778d5d2b5b6026a 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_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.
@@ -87,6 +87,11 @@ public:
    */
   static Dali::WebEngineCookieManager* GetCookieManager();
 
+  /**
+   * @copydoc Dali::Toolkit::WebView::ChangeOrientation()
+   */
+  void ChangeOrientation(int orientation);
+
   /**
    * @copydoc Dali::Toolkit::WebView::GetSettings()
    */