diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc index 8eeb8011d27d0a9e7d1786272accd518f06f7ea9..c6e09bd9b40ebc8bfc227f16e4d6884b1c18f388 100644 --- a/content/browser/renderer_host/input/input_router_impl.cc +++ b/content/browser/renderer_host/input/input_router_impl.cc @@ -34,7 +34,7 @@ #include "ui/events/blink/web_input_event_traits.h" #include "ui/events/event.h" #include "ui/events/keycodes/keyboard_codes.h" - +#include "ohos_adapter_helper.h" namespace content { using blink::WebGestureEvent; @@ -72,6 +72,7 @@ std::unique_ptr ScaleEvent( std::vector>(), latency_info); } constexpr uint64_t GESTURE_MOVE_PERIOD = 250000000; +const int SOC_PERF_SLIDE_NORMAL_CONFIG_ID = 10025; } // namespace InputRouterImpl::InputRouterImpl( @@ -148,10 +149,16 @@ void InputRouterImpl::SendGestureEvent( prePerfTimeStamp_ = timeStamp_; LOG(INFO) << "InputRouterImpl::SendGestureEvent type=kGestureScrollUpdate success"; client_->GetWidgetInputHandler()->TryStartFling(); + OHOS::NWeb::OhosAdapterHelper::GetInstance() + .CreateSocPerfClientAdapter() + ->ApplySocPerfConfigByIdEx(SOC_PERF_SLIDE_NORMAL_CONFIG_ID, true); } else if (gesture_event.event.GetType() == WebInputEvent::Type::kGestureScrollEnd) { LOG(INFO) << "InputRouterImpl::SendGestureEvent type=kGestureScrollEnd"; client_->GetWidgetInputHandler()->TryFinishFling(); + OHOS::NWeb::OhosAdapterHelper::GetInstance() + .CreateSocPerfClientAdapter() + ->ApplySocPerfConfigByIdEx(SOC_PERF_SLIDE_NORMAL_CONFIG_ID, false); prePerfTimeStamp_ = 0; } #endif