• Michael Giuffrida's avatar
    Add input event counts to tab activity UKMs · 480aed6a
    Michael Giuffrida authored
    This adds counters for key, mouse, and touch events to
    TabActivityWatcher::WebContentsData. When a tab is logged, these
    counters are reported in the UKM. The counters are reset on each
    navigation.
    
    These counters are passed to TabSnapshotLogger in a new hierarchical
    structure, which will be built upon to add browser-, tab- and page-
    specific metrics. Separating these event counts into a separate struct
    makes it easier to reset them when a navigation occurs.
    
    This CL counts the absolute number of events -- as an improvement, we
    would prefer to count user actions rather than, say, the exact
    number of mouse-move events fired.
    
    A unit test simulates mouse activity, but key and touch are harder to
    pipe in from a unit test.
    
    Bug: 784639
    Change-Id: I693c34f0845c3fdeca6c1fb172e7347f9c2a504f
    Reviewed-on: https://chromium-review.googlesource.com/794592
    Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
    Reviewed-by: default avatarSteven Holte <holte@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#520674}
    480aed6a
tab_metrics_logger.h 1.4 KB