Make Interaction Media Features MQ dynamic on Windows

Desktop / Chromium - alexis.menard [intel.com] - 15 April 2017 05:01 EDT

With the new convertible and detachable form factors for laptops it is important to make sure the interaction media features are updated whenever the keyboard/trackpad combo is flipped (so inactive) or detached. This will allow content author to react to media query changes to adapt the user interface to better suit the new interaction method (often touch vs trackpad).

BUG=442418

Review-Url: https://codereview.chromium.org/2690323002 Cr-Commit-Position: refs/heads/master@{#464863}

b12ba34 Make Interaction Media Features MQ dynamic on Windows.
content/browser/BUILD.gn | 3 +
.../input/input_device_change_observer.cc | 60 +++++++++++++
.../input/input_device_change_observer.h | 38 +++++++++
.../input/interaction_mq_dynamic_browsertest.cc | 43 ++++++++++
.../browser/renderer_host/render_view_host_impl.cc | 3 +-
.../browser/renderer_host/render_view_host_impl.h | 4 +
content/test/BUILD.gn | 1 +
content/test/data/interaction-mq-dynamic.html | 30 +++++++
ui/base/touch/touch_device.h | 3 +
ui/base/touch/touch_device_win.cc | 14 +++
ui/events/devices/BUILD.gn | 2 +
ui/events/devices/input_device_observer_win.cc | 99 ++++++++++++++++++++++
ui/events/devices/input_device_observer_win.h | 48 +++++++++++
13 files changed, 347 insertions(+), 1 deletion(-)

Upstream: git.chromium.org


  • Share