[M108 Migration][Gesture] Bring up gesture configuration 49/287849/6
authorv-saha <v.saha@samsung.com>
Tue, 14 Feb 2023 12:04:16 +0000 (17:34 +0530)
committerBot Blink <blinkbot@samsung.com>
Wed, 15 Feb 2023 23:11:05 +0000 (23:11 +0000)
Scroller will be created when ShouldUseMobileFlingCurve() is enabled

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

Change-Id: I4b3d93d354beacd9fa201b93a9a7eb31a9801b10
Signed-off-by: v-saha <v.saha@samsung.com>
tizen_src/ewk/efl_integration/content_browser_client_efl.h
ui/events/gesture_detection/gesture_configuration_aura.cc

index 04a7e13..d783485 100644 (file)
@@ -11,6 +11,7 @@
 #include "services/service_manager/public/cpp/binder_registry.h"
 #include "third_party/blink/public/common/loader/url_loader_throttle.h"
 #include "third_party/blink/public/web/web_window_features.h"
+#include "tizen/system_info.h"
 
 namespace base {
 class CommandLine;
@@ -60,7 +61,7 @@ class ContentBrowserClientEfl : public ContentBrowserClient {
   // ContentBrowserClient implementations.
   std::unique_ptr<BrowserMainParts> CreateBrowserMainParts(
       bool is_integration_test) override;
-
+  bool ShouldUseMobileFlingCurve() override { return IsMobileProfile(); }
   void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
                                       int child_process_id) override;
   bool CanCreateWindow(RenderFrameHost* opener,
index 85288d4..9d9407d 100644 (file)
@@ -4,6 +4,8 @@
 
 #include "ui/events/gesture_detection/gesture_configuration.h"
 
+#include <Elementary.h>
+
 #include "base/command_line.h"
 #include "base/memory/singleton.h"
 #include "base/strings/string_number_conversions.h"
 namespace ui {
 namespace {
 
+#if BUILDFLAG(IS_EFL)
+const float kDefaultMaxFlingVelocity = 4500;
+#endif
+
 #if BUILDFLAG(IS_CHROMEOS_ASH)
 constexpr bool kDoubleTapAuraSupport = true;
 #else
@@ -51,6 +57,14 @@ class GestureConfigurationAura : public GestureConfiguration {
     set_double_tap_enabled(kDoubleTapAuraSupport);
     set_double_tap_timeout_in_ms(double_tap_timeout_in_ms());
     set_gesture_begin_end_types_enabled(true);
+#if BUILDFLAG(IS_EFL)
+    set_long_press_time_in_ms(elm_config_longpress_timeout_get() * 1000);
+    set_max_tap_count(1);
+    set_max_distance_between_taps_for_double_tap(elm_config_finger_size_get());
+    set_max_touch_move_in_pixels_for_click(
+        elm_config_scroll_thumbscroll_threshold_get());
+    set_max_fling_velocity(kDefaultMaxFlingVelocity);
+#endif
     set_min_gesture_bounds_length(default_radius());
     set_min_pinch_update_span_delta(
         base::CommandLine::ForCurrentProcess()->HasSwitch(