0
Commit Graph

10 Commits

Author SHA1 Message Date
Aman Verma
3c0517dbb2 [4/n] Introduce RenderInputRouterClient and move InputRouterClient
implementation to RenderInputRouter.

This CL refactors input handling interfaces by moving InputRouterClient
interface's implementation to RenderInputRouter completely from
RenderWidgetHostImpl, which would allow RenderInputRouter to handle
touch input events with InputVizard. RenderInputRouterClient is also
introduced which would be passing the repsonsiblity of handling
non-touch input events to RenderWidgetHostImpl in the browser, since
these are not going to be handled on VizCompositor thread with
InputVizard.

Doc Link:
https://docs.google.com/document/d/1dgbvnRChsvfMpXceQ24UbTdFwJpmk5VIl7WXHwExAC4/edit?tab=t.0#heading=h.7wb78gd5w8i0

Bug: b:331420891
Change-Id: I6669f8457bcb7ccf7db639325e6f23fc1c2785f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5636652
Auto-Submit: Aman Verma <amanvr@google.com>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Cr-Commit-Position: refs/heads/main@{#1320247}
2024-06-27 11:50:21 +00:00
Kartar Singh
b1bfa1a221 Move render input router and related dependencies to //components/input
This is being done as a part of InputVizard project[1] where touch input
handling is being moved to Viz on Android. Earlier we had
been refactoring input related bits from browser classes and placing
them in //content/common/input but since Viz cannot depend on content,
the input code is being moved into //components/input.

[1] https://docs.google.com/document/d/1mcydbkgFCO_TT9NuFE962L8PLJWT2XOfXUAPO88VuKE

Bug: b/340182114
Change-Id: I14187a7ed34d576a5c6d86bf6ed08174bcef04fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5613297
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Kartar Singh <kartarsingh@google.com>
Cr-Commit-Position: refs/heads/main@{#1318531}
2024-06-24 13:14:57 +00:00
Kartar Singh
a9e97b1a6f Squash InputRouterImplClient, InputRouterClient interfaces and remove //content's dependency on input_router_impl.h
This change merges the above mentioned interfaces, since
InputRouterClient is only ever extended by InputRouterClientImplClient
and by MockInputRouterClient. The split isn't for logically splitting
two different concepts, instead they existed due to historical reasons
where we had LegacyInputRouter based on legacy IPC.

P.S. Some tests and test support files still depend on
input_router_impl.h but they would be removed later when we move test
files to //components/input: http://b/345502386.

Bug: b/340182114
Change-Id: I7d1f19d75695c27c64f3a7c203f72b11fad360c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5621072
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Kartar Singh <kartarsingh@google.com>
Cr-Commit-Position: refs/heads/main@{#1316535}
2024-06-18 17:12:38 +00:00
Kartar Singh
d084e58171 Move input router and related dependencies to //components/input
This is being done as a part of InputVizard project[1] where touch input
handling is being moved to Viz on Android. Earlier we had
been refactoring input related bits from browser classes and placing
them in //content/common/input but since Viz cannot depend on content,
the input code is being moved into //components/input.

[1] https://docs.google.com/document/d/1mcydbkgFCO_TT9NuFE962L8PLJWT2XOfXUAPO88VuKE

Bug: b/340182114
Change-Id: I48186b0155557f82d2782359a175851d045cd792
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5588038
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Kartar Singh <kartarsingh@google.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1314170}
2024-06-12 19:22:24 +00:00
Aman Verma
e574c54125 [3/n] Move gesture input related methods from RenderWidgetHostImpl to
RenderInputRouter.

This CL does following things:

1. Moves ForwardGestureEventWithLatencyInfo method to RIR and fixes
tests.
2. Moves OnGestureEventAck handling to RIR.
3. Moves PeakGpuMemoryTracker interface from RWHI to RIR by moving it to
//content/common/ directory. PeakGpuMemoryTrackerImpl will have a
different implementation on GPU process.
4. Moves `is_currently_scrolling_viewport_` to RIR from
RenderWidgetHostViewBase for handling gesture event forwarding.

Doc Link:
https://docs.google.com/document/d/1dgbvnRChsvfMpXceQ24UbTdFwJpmk5VIl7WXHwExAC4/edit?tab=t.0#heading=h.7wb78gd5w8i0

Bug: b:331420891
Change-Id: Id4f4a9b73bc5928972a42f49d8b7f0d617d55773
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5535454
Commit-Queue: Aman Verma <amanvr@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313397}
2024-06-11 14:32:26 +00:00
Aman Verma
e1a8b91283 [2/n] Move InputDispositionHandler implementation to RenderInputRouter
from RenderWidgetHostImpl.

This CL migrates InputDispositionHandler implementation from
RenderWidgetHostImpl to RenderInputRouter. RenderInputRouter will
currently delegate handling GestureEventAck and WheelEventAck to RWHI,
however GestureEventAck handling will be moved to RIR in the next CL to
allow handling touch input events in the common code with InputVizard.

This refactoring is a part of bigger project to handle input on viz
thread (go/input-on-viz). We are moving input related interfaces that
RenderWidgetHostImpl uses to //components/input. This would provide a
single stack in //components/input that we quickly enter in either the
browser or GPU viz which would allow for relatively clean movement of
code. GPU process can link in the same input stack and forward the data
to the renderer using the same code.

Doc Link:
https://docs.google.com/document/d/1dgbvnRChsvfMpXceQ24UbTdFwJpmk5VIl7WXHwExAC4/edit?tab=t.0#heading=h.7wb78gd5w8i0

Bug: b:331420891
Change-Id: Ia6e04472d133125893afe952d1cdeafd00339e69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5589804
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Cr-Commit-Position: refs/heads/main@{#1312698}
2024-06-10 12:26:13 +00:00
Kartar Singh
9daf31420a Move fling_scheduler_base to //components/input
This is being done as a part of InputVizard project[1] where touch input
handling is being moved to Viz on Android. Earlier we had
been refactoring input related bits from browser classes and placing
them in //content/common/input but since Viz cannot depend on content,
the input code is being moved into //components/input.

[1] https://docs.google.com/document/d/1mcydbkgFCO_TT9NuFE962L8PLJWT2XOfXUAPO88VuKE

Bug: b/340182114
Change-Id: I39b216acdec20bcc60beecb4b30fe1fc89188a1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5587716
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Kartar Singh <kartarsingh@google.com>
Cr-Commit-Position: refs/heads/main@{#1312236}
2024-06-07 20:54:55 +00:00
Aman Verma
d589571ff5 [1/n] Move touch input related methods from RenderWidgetHostImpl to
RenderInputRouter.

This CL does following things:
1. Modifies RenderWidgetHostLatencyTracker to
   RenderInputRouterLatencyTracker.
2. Moves methods ForwardTouchEventWithLatencyInfo and
   DispatchInputEventWithLatencyInfo to RIR.
3. Implements InputDispositionHandler interface on RIR, handling
   TouchAcks and forwarding wheel and gesture acks to be handled by
   RWHI. GestureAck's handling will be moved to RIR in subsequent CLs.
4. Makes BrowserAccessibilityStateImpl an InputEventObserver.
5. Removes unnecessary StopFling() from RWHI::DidNavigate.

AX-Relnotes: n/a
Bug: b:331420891
Change-Id: Iee2c9c360d866ecb68db6f88e0d7463f8554e2af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527130
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Aman Verma <amanvr@google.com>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1311833}
2024-06-07 09:33:18 +00:00
Aman Verma
d78747f586 [1/2] Remove dependencies of RenderWidgetTargeter and RWHIER on
RenderWidgetHostImpl.

This CL introduces the following changes to remove dependency of
RenderWidgetTargeter and RenderWidgetHostInputEventRouter on
RenderWidgetHostImpl :

1. Introduces RenderInputRouterDelegate to allow delegation of methods
which will have a different implementation in Viz with InputVizard.
2.  Moves mojo methods (ShowContextMenu & BindInputTargetClient) from
FrameWidget interface to RenderInputRouterClient mojo interface.
3. Moves is_in_gesture_scroll_, is_in_touchpad_gesture_fling_ from RWHI
to RIR.
4. Modify RenderWidgetHostInputEventRouter's GetRenderWidgetHostAtPoint
method to GetRenderWidgetHostViewInputAtPoint.

Doc Link:
https://docs.google.com/document/d/1dgbvnRChsvfMpXceQ24UbTdFwJpmk5VIl7WXHwExAC4/edit?tab=t.0#heading=h.7wb78gd5w8i0

Change-Id: I8c62155e5f19f3b50faf9e617b5e5de0ebb4bcb3
Bug: b:330555923
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5371927
Commit-Queue: Aman Verma <amanvr@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1285164}
2024-04-10 16:07:44 +00:00
Aman Verma
c007d0e535 Allow forwarding input using RenderInputRouter in browser process.
This change introduces RenderInputRouter, which would allow code reuse between the Browser and the GPU processes in Chrome for InputVizard (go/chrome-input-on-viz), where we intend to handle input on VizCompositor along with browser process. This CL only adds/implements necessary interfaces to forward input from browser to renderers through RenderInputRouter.

Doc: https://docs.google.com/document/d/1dgbvnRChsvfMpXceQ24UbTdFwJpmk5VIl7WXHwExAC4/edit?usp=sharing

Bug: b/326201500, b/319607091

Change-Id: I49d2bff95002d9774fabaca5cf5a1b905ec9c071
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185080
Commit-Queue: Aman Verma <amanvr@google.com>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1263872}
2024-02-22 10:40:53 +00:00