Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)

Created:
3 years, 10 months ago by darktears
Modified:
3 years, 7 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, tdresser+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Interaction Media Features MQ dynamic on Windows. 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

Patch Set 1 : Make Interaction Media Features MQ dynamic on Windows. #

Patch Set 2 : Make Interaction Media Features MQ dynamic on Windows. #

Total comments: 3

Patch Set 3 : Rebased #

Total comments: 2

Patch Set 4 : No debug :) #

Total comments: 1

Patch Set 5 : Only update when ConvertibleSlateMode changes #

Total comments: 2

Patch Set 6 : Fix nits from mustaq #

Patch Set 7 : Added test #

Total comments: 2

Patch Set 8 : Added Trace #

Total comments: 7

Patch Set 9 : Fix review comments #

Patch Set 10 : Nit fix #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -1 line) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/input_device_change_observer.h View 1 2 3 4 5 6 7 8 1 chunk +38 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/input_device_change_observer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +60 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/interaction_mq_dynamic_browsertest.cc View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A content/test/data/interaction-mq-dynamic.html View 1 2 3 4 5 6 1 chunk +30 lines, -0 lines 0 comments Download
M ui/base/touch/touch_device.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M ui/base/touch/touch_device_win.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M ui/events/devices/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A ui/events/devices/input_device_observer_win.h View 1 2 3 4 5 6 7 8 1 chunk +48 lines, -0 lines 1 comment Download
A ui/events/devices/input_device_observer_win.cc View 1 2 3 4 5 6 7 8 1 chunk +99 lines, -0 lines 0 comments Download

Messages

Total messages: 85 (43 generated)
darktears
3 years, 9 months ago (2017-03-21 16:58:48 UTC) #14
mustaq
https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc File ui/base/touch/touch_device_win.cc (right): https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc#newcode26 ui/base/touch/touch_device_win.cc:26: // while the device is used as a tablet. ...
3 years, 9 months ago (2017-03-21 17:05:38 UTC) #17
darktears
https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc File ui/base/touch/touch_device_win.cc (right): https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc#newcode26 ui/base/touch/touch_device_win.cc:26: // while the device is used as a tablet. ...
3 years, 9 months ago (2017-03-21 17:14:45 UTC) #18
darktears
On 2017/03/21 17:14:45, darktears wrote: > https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc > File ui/base/touch/touch_device_win.cc (right): > > https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc#newcode26 > ...
3 years, 9 months ago (2017-03-21 17:21:08 UTC) #19
mustaq
On 2017/03/21 17:21:08, darktears wrote: > On 2017/03/21 17:14:45, darktears wrote: > > > https://codereview.chromium.org/2690323002/diff/60001/ui/base/touch/touch_device_win.cc ...
3 years, 9 months ago (2017-03-21 17:32:11 UTC) #20
mustaq
https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/device_data_manager.cc File ui/events/devices/device_data_manager.cc (right): https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/device_data_manager.cc#newcode167 ui/events/devices/device_data_manager.cc:167: LOG(ERROR) << "mDebug " << __FUNCTION__; Please remove the ...
3 years, 9 months ago (2017-03-21 17:53:08 UTC) #21
darktears
On 2017/03/21 17:53:08, mustaq wrote: > https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/device_data_manager.cc > File ui/events/devices/device_data_manager.cc (right): > > https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/device_data_manager.cc#newcode167 > ...
3 years, 9 months ago (2017-03-21 18:26:24 UTC) #22
mustaq
> https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/input_device_observer_win.cc > > File ui/events/devices/input_device_observer_win.cc (right): > > > > > https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/input_device_observer_win.cc#newcode77 > > ...
3 years, 9 months ago (2017-03-21 19:52:06 UTC) #23
darktears
On 2017/03/21 19:52:06, mustaq wrote: > > > https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/input_device_observer_win.cc > > > File ui/events/devices/input_device_observer_win.cc (right): ...
3 years, 9 months ago (2017-03-21 20:45:00 UTC) #24
darktears
On 2017/03/21 19:52:06, mustaq wrote: > > > https://codereview.chromium.org/2690323002/diff/80001/ui/events/devices/input_device_observer_win.cc > > > File ui/events/devices/input_device_observer_win.cc (right): ...
3 years, 9 months ago (2017-03-21 21:38:47 UTC) #25
darktears
On 2017/03/21 21:38:47, darktears wrote: > On 2017/03/21 19:52:06, mustaq wrote: > > > > ...
3 years, 9 months ago (2017-03-22 15:12:10 UTC) #26
mustaq
https://codereview.chromium.org/2690323002/diff/100001/ui/events/devices/input_device_observer_win.cc File ui/events/devices/input_device_observer_win.cc (right): https://codereview.chromium.org/2690323002/diff/100001/ui/events/devices/input_device_observer_win.cc#newcode27 ui/events/devices/input_device_observer_win.cc:27: // https://msdn.microsoft.com/en-us/library/windows/hardware/dn922653(v=vs.85).aspx. I couldn't find a connection between ConvertibleSlateMode ...
3 years, 9 months ago (2017-03-22 18:10:03 UTC) #28
darktears
On 2017/03/22 18:10:03, mustaq wrote: > https://codereview.chromium.org/2690323002/diff/100001/ui/events/devices/input_device_observer_win.cc > File ui/events/devices/input_device_observer_win.cc (right): > > https://codereview.chromium.org/2690323002/diff/100001/ui/events/devices/input_device_observer_win.cc#newcode27 > ...
3 years, 9 months ago (2017-03-22 21:49:19 UTC) #29
mustaq
On 2017/03/22 21:49:19, darktears wrote: > On 2017/03/22 18:10:03, mustaq wrote: > > > https://codereview.chromium.org/2690323002/diff/100001/ui/events/devices/input_device_observer_win.cc ...
3 years, 9 months ago (2017-03-23 14:55:00 UTC) #30
darktears
On 2017/03/23 14:55:00, mustaq wrote: > On 2017/03/22 21:49:19, darktears wrote: > > On 2017/03/22 ...
3 years, 9 months ago (2017-03-23 15:31:21 UTC) #31
darktears
On 2017/03/23 15:31:21, darktears wrote: > On 2017/03/23 14:55:00, mustaq wrote: > > On 2017/03/22 ...
3 years, 9 months ago (2017-03-23 16:54:24 UTC) #32
mustaq
LGTM except for two nits: https://codereview.chromium.org/2690323002/diff/120001/ui/events/devices/input_device_observer_win.cc File ui/events/devices/input_device_observer_win.cc (right): https://codereview.chromium.org/2690323002/diff/120001/ui/events/devices/input_device_observer_win.cc#newcode27 ui/events/devices/input_device_observer_win.cc:27: // https://msdn.microsoft.com/en-us/library/windows/hardware/dn922653(v=vs.85).aspx. Nit: Perhaps ...
3 years, 9 months ago (2017-03-23 20:09:10 UTC) #33
darktears
On 2017/03/23 20:09:10, mustaq wrote: > LGTM except for two nits: > > https://codereview.chromium.org/2690323002/diff/120001/ui/events/devices/input_device_observer_win.cc > ...
3 years, 9 months ago (2017-03-23 20:27:54 UTC) #34
mustaq
On 2017/03/23 20:27:54, darktears wrote: > On 2017/03/23 20:09:10, mustaq wrote: > > LGTM except ...
3 years, 9 months ago (2017-03-23 20:31:15 UTC) #35
darktears
cpu@chromium.org: Please review changes as it's windows. jam@chromium.org: Please review changes in content/
3 years, 9 months ago (2017-03-23 20:41:10 UTC) #37
darktears
On 2017/03/23 20:41:10, darktears wrote: > mailto:cpu@chromium.org: Please review changes as it's windows. > > ...
3 years, 9 months ago (2017-03-23 20:48:05 UTC) #38
Rick Byers
I'm not an OWNER in content at all, so I'll leave the detailed reviews to ...
3 years, 9 months ago (2017-03-24 16:20:04 UTC) #43
darktears
On 2017/03/24 16:20:04, Rick Byers wrote: > I'm not an OWNER in content at all, ...
3 years, 8 months ago (2017-04-04 22:39:10 UTC) #44
Rick Byers
https://codereview.chromium.org/2690323002/diff/160001/content/browser/renderer_host/input/input_device_change_observer.cc File content/browser/renderer_host/input/input_device_change_observer.cc (right): https://codereview.chromium.org/2690323002/diff/160001/content/browser/renderer_host/input/input_device_change_observer.cc#newcode44 content/browser/renderer_host/input/input_device_change_observer.cc:44: if (render_view_host_->InputDeviceFeaturesChanged()) In case there turns out to be ...
3 years, 8 months ago (2017-04-05 18:45:50 UTC) #49
Rick Byers
On 2017/04/04 22:39:10, darktears wrote: > On 2017/03/24 16:20:04, Rick Byers wrote: > > I'm ...
3 years, 8 months ago (2017-04-05 18:51:24 UTC) #50
darktears
On 2017/04/05 18:51:24, Rick Byers wrote: > On 2017/04/04 22:39:10, darktears wrote: > > On ...
3 years, 8 months ago (2017-04-05 20:17:53 UTC) #51
darktears
On 2017/04/05 18:45:50, Rick Byers wrote: > https://codereview.chromium.org/2690323002/diff/160001/content/browser/renderer_host/input/input_device_change_observer.cc > File content/browser/renderer_host/input/input_device_change_observer.cc > (right): > > ...
3 years, 8 months ago (2017-04-05 20:19:30 UTC) #52
cpu_(ooo_6.6-7.5)
definitely need ananta input here, I see we are doing work arounds about windows behaviors ...
3 years, 8 months ago (2017-04-06 01:48:39 UTC) #57
mustaq
One quick nit: Please copy the CL title into the first line of the CL ...
3 years, 8 months ago (2017-04-06 16:37:01 UTC) #58
ananta
some questions https://codereview.chromium.org/2690323002/diff/180001/ui/events/devices/input_device_observer_win.cc File ui/events/devices/input_device_observer_win.cc (right): https://codereview.chromium.org/2690323002/diff/180001/ui/events/devices/input_device_observer_win.cc#newcode44 ui/events/devices/input_device_observer_win.cc:44: weak_factory_.GetWeakPtr(), registry_key_.get()); Doesn't WM_SETTINGCHANGE fire when this ...
3 years, 8 months ago (2017-04-08 00:54:47 UTC) #60
jam
https://codereview.chromium.org/2690323002/diff/180001/content/browser/renderer_host/input/input_device_change_observer.cc File content/browser/renderer_host/input/input_device_change_observer.cc (right): https://codereview.chromium.org/2690323002/diff/180001/content/browser/renderer_host/input/input_device_change_observer.cc#newcode44 content/browser/renderer_host/input/input_device_change_observer.cc:44: void InputDeviceChangeObserver::notifyRenderViewHost() { please follow google style guide (i.e ...
3 years, 8 months ago (2017-04-10 15:01:06 UTC) #61
darktears
On 2017/04/08 00:54:47, ananta wrote: > some questions > > https://codereview.chromium.org/2690323002/diff/180001/ui/events/devices/input_device_observer_win.cc > File ui/events/devices/input_device_observer_win.cc (right): ...
3 years, 8 months ago (2017-04-10 21:15:21 UTC) #62
darktears
On 2017/04/10 15:01:06, jam wrote: > https://codereview.chromium.org/2690323002/diff/180001/content/browser/renderer_host/input/input_device_change_observer.cc > File content/browser/renderer_host/input/input_device_change_observer.cc > (right): > > https://codereview.chromium.org/2690323002/diff/180001/content/browser/renderer_host/input/input_device_change_observer.cc#newcode44 ...
3 years, 8 months ago (2017-04-10 21:19:22 UTC) #63
jam
lgtm
3 years, 8 months ago (2017-04-11 14:53:04 UTC) #72
darktears
On 2017/04/11 14:53:04, jam wrote: > lgtm Thanks @jam. I will wait ananta feedback now.
3 years, 8 months ago (2017-04-11 15:03:37 UTC) #73
darktears
On 2017/04/11 15:03:37, darktears wrote: > On 2017/04/11 14:53:04, jam wrote: > > lgtm > ...
3 years, 8 months ago (2017-04-14 15:04:41 UTC) #74
ananta
lgtm
3 years, 8 months ago (2017-04-15 00:58:19 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2690323002/220001
3 years, 8 months ago (2017-04-15 06:10:59 UTC) #78
commit-bot: I haz the power
Prior attempt to commit was detected, but we were not able to check whether the ...
3 years, 8 months ago (2017-04-15 09:06:52 UTC) #81
darktears
On 2017/04/15 09:06:52, commit-bot: I haz the power wrote: > Prior attempt to commit was ...
3 years, 8 months ago (2017-04-17 15:18:53 UTC) #82
sadrul
https://codereview.chromium.org/2690323002/diff/220001/ui/events/devices/input_device_observer_win.h File ui/events/devices/input_device_observer_win.h (right): https://codereview.chromium.org/2690323002/diff/220001/ui/events/devices/input_device_observer_win.h#newcode18 ui/events/devices/input_device_observer_win.h:18: class EVENTS_DEVICES_EXPORT InputDeviceObserverWin { Can this be an InputDeviceManager? ...
3 years, 7 months ago (2017-05-10 01:38:33 UTC) #84
darktears
3 years, 7 months ago (2017-05-11 19:14:40 UTC) #85
Message was sent while issue was closed.
On 2017/05/10 01:38:33, sadrul wrote:
>
https://codereview.chromium.org/2690323002/diff/220001/ui/events/devices/inpu...
> File ui/events/devices/input_device_observer_win.h (right):
> 
>
https://codereview.chromium.org/2690323002/diff/220001/ui/events/devices/inpu...
> ui/events/devices/input_device_observer_win.h:18: class EVENTS_DEVICES_EXPORT
> InputDeviceObserverWin {
> Can this be an InputDeviceManager? e.g.
> 
> class InputDeviceManagerWin : public InputDeviceManager {
> };

It was discussed in this CL but Windows can't reliably tell you the connected
devices in the system (sometimes even if the device is physically disconnected,
it still appears in the Device Manager). Therefore implementing a subclass of
InputDeviceManager is pointless as it will hold potentially bogus list of
devices. Even considering it as a subclass I'm not sure the benefits of it.

Powered by Google App Engine
This is Rietveld 408576698