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

Issue 783773002: Register for HID device notifications on Windows. (Closed)

Created:
6 years ago by Reilly Grant (use Gerrit)
Modified:
5 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Register for HID device notifications on Windows. Instead of re-enumerating all HID devices whenever asked this change registers with Windows to receive window messages whenever a HID device is added or removed. This will allow Chrome to notify apps when devices are connected so that they do not need to poll. BUG=376719 Committed: https://crrev.com/08f9e07efe44307b55e5de46721364b3e03b31d6 Cr-Commit-Position: refs/heads/master@{#307124}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -177 lines) Patch
M device/hid/hid_connection_win.h View 2 chunks +2 lines, -3 lines 0 comments Download
M device/hid/hid_connection_win.cc View 1 chunk +3 lines, -19 lines 0 comments Download
M device/hid/hid_service_win.h View 3 chunks +21 lines, -13 lines 0 comments Download
M device/hid/hid_service_win.cc View 6 chunks +113 lines, -142 lines 4 comments Download

Messages

Total messages: 11 (3 generated)
Reilly Grant (use Gerrit)
One more patch for you.
6 years ago (2014-12-05 22:24:40 UTC) #2
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc File device/hid/hid_service_win.cc (right): https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc#newcode74 device/hid/hid_service_win.cc:74: window_.reset(new base::win::MessageWindow()); nit: Maybe file a bug + ...
6 years ago (2014-12-05 23:27:53 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/783773002/1
6 years ago (2014-12-05 23:48:54 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
6 years ago (2014-12-06 00:44:32 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/08f9e07efe44307b55e5de46721364b3e03b31d6 Cr-Commit-Position: refs/heads/master@{#307124}
6 years ago (2014-12-06 00:45:21 UTC) #7
Nico
https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc File device/hid/hid_service_win.cc (right): https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc#newcode294 device/hid/hid_service_win.cc:294: GetLastError() == base::File::FILE_ERROR_ACCESS_DENIED) { Are you sure this is ...
5 years ago (2015-12-09 17:05:45 UTC) #9
Reilly Grant (use Gerrit)
https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc File device/hid/hid_service_win.cc (right): https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc#newcode294 device/hid/hid_service_win.cc:294: GetLastError() == base::File::FILE_ERROR_ACCESS_DENIED) { On 2015/12/09 17:05:45, Nico wrote: ...
5 years ago (2015-12-09 18:49:30 UTC) #10
Nico
5 years ago (2015-12-09 19:10:54 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.cc
File device/hid/hid_service_win.cc (right):

https://codereview.chromium.org/783773002/diff/1/device/hid/hid_service_win.c...
device/hid/hid_service_win.cc:294: GetLastError() ==
base::File::FILE_ERROR_ACCESS_DENIED) {
On 2015/12/09 18:49:29, Reilly Grant wrote:
> On 2015/12/09 17:05:45, Nico wrote:
> > Are you sure this is correct? The CreateFile() MSDN docs say that
> GetLastError()
> > will return ERROR_ACCESS_DENIED which has a numerical value of 5.
> > base::File::FILE_ERROR_ACCESS_DENIED has a numerical value of -5, is a
> > cross-platform enum, and doesn't mention anywhere that its values are equal
to
> > what the windows function GetLastError() returns.
> 
> Interesting. I wonder if this logic has ever been exercised on Windows. It was
> added in https://codereview.chromium.org/240263003.

Deleting this block if it's broken and untested sounds fine to me -- up to you
folks what to do :-)

Powered by Google App Engine
This is Rietveld 408576698