chromium/components/input/render_input_router.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/input/render_input_router.h"

#include <utility>
#include <vector>

#include "base/check.h"
#include "base/command_line.h"
#include "base/debug/stack_trace.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "cc/input/browser_controls_offset_tags_info.h"
#include "components/input/input_router_config_helper.h"
#include "components/input/render_input_router_client.h"
#include "components/input/render_widget_host_input_event_router.h"
#include "components/input/render_widget_host_view_input.h"
#include "components/input/touch_emulator.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/common/input/web_input_event.h"

WebGestureEvent;
WebInputEvent;

namespace input {
namespace {

class UnboundWidgetInputHandler : public blink::mojom::WidgetInputHandler {};

base::LazyInstance<UnboundWidgetInputHandler>::Leaky g_unbound_input_handler =;

}  // namespace

RenderInputRouter::~RenderInputRouter() = default;

RenderInputRouter::RenderInputRouter(
    RenderInputRouterClient* host,
    std::unique_ptr<FlingSchedulerBase> fling_scheduler,
    RenderInputRouterDelegate* delegate,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner)
    :{}

void RenderInputRouter::SetupInputRouter(float device_scale_factor) {}

void RenderInputRouter::BindRenderInputRouterInterfaces(
    mojo::PendingRemote<blink::mojom::RenderInputRouterClient> remote) {}

void RenderInputRouter::RendererWidgetCreated(bool for_frame_widget) {}

void RenderInputRouter::SetForceEnableZoom(bool enabled) {}

void RenderInputRouter::SetDeviceScaleFactor(float device_scale_factor) {}

void RenderInputRouter::ProgressFlingIfNeeded(base::TimeTicks current_time) {}

void RenderInputRouter::StopFling() {}

bool RenderInputRouter::IsAnyScrollGestureInProgress() const {}

blink::mojom::WidgetInputHandler* RenderInputRouter::GetWidgetInputHandler() {}

void RenderInputRouter::OnImeCompositionRangeChanged(
    const gfx::Range& range,
    const std::optional<std::vector<gfx::Rect>>& character_bounds,
    const std::optional<std::vector<gfx::Rect>>& line_bounds) {}
void RenderInputRouter::OnImeCancelComposition() {}

StylusInterface* RenderInputRouter::GetStylusInterface() {}

void RenderInputRouter::OnStartStylusWriting() {}

bool RenderInputRouter::IsWheelScrollInProgress() {}

bool RenderInputRouter::IsAutoscrollInProgress() {}

void RenderInputRouter::SetMouseCapture(bool capture) {}

void RenderInputRouter::SetAutoscrollSelectionActiveInMainFrame(
    bool autoscroll_selection) {}

void RenderInputRouter::RequestMouseLock(
    bool from_user_gesture,
    bool unadjusted_movement,
    InputRouterImpl::RequestMouseLockCallback response) {}

gfx::Size RenderInputRouter::GetRootWidgetViewportSize() {}

blink::mojom::InputEventResultState RenderInputRouter::FilterInputEvent(
    const blink::WebInputEvent& event,
    const ui::LatencyInfo& latency_info) {}

void RenderInputRouter::IncrementInFlightEventCount() {}

void RenderInputRouter::NotifyUISchedulerOfGestureEventUpdate(
    blink::WebInputEvent::Type gesture_event) {}

void RenderInputRouter::DecrementInFlightEventCount(
    blink::mojom::InputEventResultSource ack_source) {}

void RenderInputRouter::DidOverscroll(const ui::DidOverscrollParams& params) {}

void RenderInputRouter::DidStartScrollingViewport() {}

void RenderInputRouter::OnInvalidInputEventSource() {}

void RenderInputRouter::ForwardGestureEventWithLatencyInfo(
    const blink::WebGestureEvent& gesture_event,
    const ui::LatencyInfo& latency_info) {}

void RenderInputRouter::ForwardWheelEventWithLatencyInfo(
    const blink::WebMouseWheelEvent& wheel_event,
    const ui::LatencyInfo& latency_info) {}

void RenderInputRouter::OnWheelEventAck(
    const input::MouseWheelEventWithLatencyInfo& wheel_event,
    blink::mojom::InputEventResultSource ack_source,
    blink::mojom::InputEventResultState ack_result) {}

void RenderInputRouter::OnTouchEventAck(
    const input::TouchEventWithLatencyInfo& event,
    blink::mojom::InputEventResultSource ack_source,
    blink::mojom::InputEventResultState ack_result) {}

void RenderInputRouter::OnGestureEventAck(
    const input::GestureEventWithLatencyInfo& event,
    blink::mojom::InputEventResultSource ack_source,
    blink::mojom::InputEventResultState ack_result) {}

void RenderInputRouter::DispatchInputEventWithLatencyInfo(
    const WebInputEvent& event,
    ui::LatencyInfo* latency,
    ui::EventLatencyMetadata* event_latency_metadata) {}

void RenderInputRouter::ForwardTouchEventWithLatencyInfo(
    const blink::WebTouchEvent& touch_event,
    const ui::LatencyInfo& latency) {}

std::unique_ptr<RenderInputRouterIterator>
RenderInputRouter::GetEmbeddedRenderInputRouters() {}

void RenderInputRouter::ShowContextMenuAtPoint(
    const gfx::Point& point,
    const ui::MenuSourceType source_type) {}

void RenderInputRouter::SendGestureEventWithLatencyInfo(
    const GestureEventWithLatencyInfo& gesture_with_latency) {}

void RenderInputRouter::DidStopFlinging() {}

blink::mojom::FrameWidgetInputHandler*
RenderInputRouter::GetFrameWidgetInputHandler() {}

void RenderInputRouter::SetView(RenderWidgetHostViewInput* view) {}

void RenderInputRouter::ResetFrameWidgetInputInterfaces() {}

void RenderInputRouter::ResetWidgetInputInterfaces() {}

void RenderInputRouter::SetInputTargetClientForTesting(
    mojo::Remote<viz::mojom::InputTargetClient> input_target_client) {}

}  // namespace input