[M108 Migration] Add ewk_settings_multiple_windows_support_[get|set] 40/288040/2
authorayush.k123 <ayush.k123@samsung.com>
Thu, 9 Feb 2023 09:50:21 +0000 (15:20 +0530)
committerBot Blink <blinkbot@samsung.com>
Fri, 10 Feb 2023 15:45:33 +0000 (15:45 +0000)
This patch adds ewk_settings_multiple_windows_suppport_[get|set].
It can set whether the webview supports multiple windows.
If set to true, 'create,window' callback must be implemented by the
application. The default is TRUE.

Reference: https://review.tizen.org/gerrit/281415/

Change-Id: Icd0075f6e550e22292b9b099c8ba264411c16ba8
Signed-off-by: Ayush Kumar<ayush.k123@samsung.com>
tizen_src/ewk/efl_integration/public/ewk_settings.cc
tizen_src/ewk/efl_integration/public/ewk_settings_internal.h

index 90de1890cb67a2ac00155c160fc46de7c6f077b4..f42cdd415d62858dce17cba27991fb57b16e522f 100644 (file)
@@ -1000,3 +1000,15 @@ Eina_Bool ewk_settings_dom_paste_allowed_get(const Ewk_Settings* settings)
   EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
   return settings->getPreferences().dom_paste_enabled;
 }
+
+void ewk_settings_multiple_windows_support_set(Ewk_Settings* settings,
+                                               Eina_Bool support) {
+  EINA_SAFETY_ON_NULL_RETURN(settings);
+  settings->getPreferences().supports_multiple_windows = support;
+  ewkUpdateWebkitPreferences(settings->getEvasObject());
+}
+
+Eina_Bool ewk_settings_multiple_windows_support_get(Ewk_Settings* settings) {
+  EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
+  return settings->getPreferences().supports_multiple_windows;
+}
index 38437cf90b992c43e0d5ada61287ef7e46810aa9..1439813a86c73f0432cd90db6d0574405ddc85b5 100644 (file)
@@ -561,6 +561,33 @@ ewk_settings_tizen_compatibility_mode_set(Ewk_Settings* settings,
                                           unsigned minor,
                                           unsigned release);
 
+/**
+ * Sets whether the webview supports multiple windows.
+ *
+ * If set to true, 'create,window' callback must be implemented by appliction.
+ * If it is false, current webview will be reused to navigate.
+ *
+ * Default value is @c EINA_TRUE.
+ *
+ * @since_tizen 6.0
+ *
+ * @param settings setting object
+ * @param support whether to support multiple windows
+ */
+EXPORT_API void ewk_settings_multiple_windows_support_set(
+    Ewk_Settings* settings,
+    Eina_Bool support);
+
+/**
+ * Gets whether the webview supports multiple windows.
+ *
+ * @since_tizen 6.0
+ *
+ * @param settings setting object
+ */
+EXPORT_API Eina_Bool
+ewk_settings_multiple_windows_support_get(Ewk_Settings* settings);
+
 #ifdef __cplusplus
 }
 #endif