prefs.use_arrow_scroll = false;
// Disallow file access from external urls by default.
prefs.allow_file_access_from_external_urls = false;
+ prefs.drag_drop_enabled = true;
prefs.use_scrollbar_thumb_focus_notifications = false;
#endif
if (command_line.HasSwitch(switches::kHideScrollbars)) {
out->use_arrow_scroll = data.use_arrow_scroll();
out->allow_file_access_from_external_urls =
data.allow_file_access_from_external_urls();
+ out->drag_drop_enabled = data.drag_drop_enabled();
out->media_playback_notification_enabled =
data.media_playback_notification_enabled();
out->media_subtitle_notification_enabled =
#endif
#if BUILDFLAG(IS_TIZEN_TV)
+ bool drag_drop_enabled = true;
bool media_playback_notification_enabled = false;
bool media_subtitle_notification_enabled = false;
#endif
return r.additional_shared_array_buffer_schemes;
}
+ static bool drag_drop_enabled(const blink::web_pref::WebPreferences& r) {
+ return r.drag_drop_enabled;
+ }
+
static bool media_playback_notification_enabled(
const blink::web_pref::WebPreferences& r) {
return r.media_playback_notification_enabled;
[EnableIf=is_tizen_tv]
bool use_scrollbar_thumb_focus_notifications;
+
+ [EnableIf=is_tizen_tv]
+ bool drag_drop_enabled;
};
#if BUILDFLAG(IS_TIZEN_TV)
virtual bool AllowFileAccessFromExternalURLs() = 0;
virtual void SetAllowFileAccessFromExternalURLs(bool) = 0;
+ virtual void SetDragDropEnabled(bool) = 0;
virtual void SetMediaSubtitleNotificationEnabled(bool) = 0;
virtual bool MediaSubtitleNotificationEnabled() = 0;
virtual void SetUseArrowScroll(bool) = 0;
#endif
#if BUILDFLAG(IS_TIZEN_TV)
+void WebSettingsImpl::SetDragDropEnabled(bool enabled) {
+ settings_->SetDragDropEnabled(enabled);
+}
+
void WebSettingsImpl::SetMediaPlaybackNotificationEnabled(bool enabled) {
settings_->SetMediaPlaybackNotificationEnabled(enabled);
}
#if BUILDFLAG(IS_TIZEN_TV)
void SetAllowFileAccessFromExternalURLs(bool) override;
bool AllowFileAccessFromExternalURLs() override;
+ void SetDragDropEnabled(bool) override;
void SetMediaPlaybackNotificationEnabled(bool) override;
bool MediaPlaybackNotificationEnabled() override;
void SetMediaSubtitleNotificationEnabled(bool) override;
settings->SetUseArrowScroll(prefs.use_arrow_scroll);
settings->SetUseScrollbarThumbFocusNotifications(
prefs.use_scrollbar_thumb_focus_notifications);
+ settings->SetDragDropEnabled(prefs.drag_drop_enabled);
#endif
#if BUILDFLAG(IS_EFL)
initial: "false",
type: "bool",
},
+ // Whether drag and drop is enabled
+ {
+ name: "dragDropEnabled",
+ initial: true,
+ type: "bool",
+ },
],
}
should_handle_drag = !is_pen;
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+ // Enable/Disable the DND(drop & drag) feature as app set.
+ if (frame_->GetSettings() && !frame_->GetSettings()->GetDragDropEnabled()) {
+ should_handle_drag = false;
+ }
+#endif
+
if (should_handle_drag && HandleDrag(event, DragInitiator::kMouse))
return WebInputEventResult::kHandledSystem;
void ewk_settings_drag_drop_enabled_set(Ewk_Settings* settings, Eina_Bool enabled)
{
- LOG_EWK_API_MOCKUP();
+#if BUILDFLAG(IS_TIZEN_TV)
+ EINA_SAFETY_ON_NULL_RETURN(settings);
+ LOG(INFO) << "ewk_settings_drag_drop_enabled_set, enabled: " << !!enabled;
+ settings->getPreferences().drag_drop_enabled = !!enabled;
+ ewkUpdateWebkitPreferences(settings->ewk_view());
+#else
+ LOG_EWK_API_MOCKUP("Only for Tizen TV");
+#endif
+
}
Eina_Bool ewk_settings_drag_drop_enabled_get(const Ewk_Settings* settings)
{
- LOG_EWK_API_MOCKUP();
+#if BUILDFLAG(IS_TIZEN_TV)
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
+ return settings->getPreferences().drag_drop_enabled;
+#else
+ LOG_EWK_API_MOCKUP("Only for Tizen TV");
return EINA_FALSE;
+#endif
}
void ewk_settings_clipboard_enabled_set(Ewk_Settings* settings, Eina_Bool enabled)