DescriptionNotify WebContentsObservers of user interactions.
This CL allows web contents observers to receive notifications of user
input when the contents is focused. User input is taken to be one of:
1. mouse down event
2. raw key down event
3. gesture tap event
The type of input is propagated to the observer, but all other details
are suppressed. This extends the existing
WebContentsObserver::OnUserGesture in two ways:
1. firing on all raw keypress events, instead of only enter and space;
2. providing the input type that triggered the call.
This CL refactors the site engagement service to use the new user
interaction notification in place of registering input callbacks on
RenderWidgetHost. It is intended that other consumers of
WebContentsObserver::OnUserGesture will be migrated to this new
method in a follow-up CL. Consumers of the RenderWidgetHost
mouse and keypress callback API may also be migrated to this
method.
BUG=548011, 464234
Committed: https://crrev.com/2dd142dd17f23127ac4a135363fe2580359150d6
Cr-Commit-Position: refs/heads/master@{#356772}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Addressing reviewer feedback #
Total comments: 4
Patch Set 3 : Refactoring site engagement to use DidGetUserInteraction #
Total comments: 7
Patch Set 4 : Moving impl to RenderWidgetHost #
Total comments: 8
Patch Set 5 : Adding histogram. Addressing reviewer feedback #
Total comments: 5
Patch Set 6 : Inlining RenderWidgetHost::OnUserInteraction #
Total comments: 3
Patch Set 7 : Addressing nits #Dependent Patchsets: Messages
Total messages: 31 (12 generated)
|