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

Issue 1056333002: Web MIDI: Improve device change monitornig on Windows (Closed)

Created:
5 years, 8 months ago by Takashi Toyoshima
Modified:
5 years, 8 months ago
Reviewers:
yukawa, yhirano
CC:
chromium-reviews, feature-media-reviews_chromium.org, toyoshim+midi_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Web MIDI: Improve device change monitornig on Windows Current implementation monitors DBT_DEVICEARRIVAL mesage, but that is not a right message to monitor device changes since actual device list that OS holds will be updated a little later. Instead, monitor DBT_DEVNODES_CHANGES that is delivered after the list being updated. In Chrome, SystemMessageWindowWin invokes base::SystemMonitor's observer with DEVTYPE_UNKNOWN for DBT_DEVNODES_CHANGED, and the SystemMonitor provides a way to observe the event on the registered thread. Using the monitor must be the right implementation. BUG=472980 Committed: https://crrev.com/3e47c6dbf899d98f38db45f4cc766bd6a2eca5cd Cr-Commit-Position: refs/heads/master@{#324031}

Patch Set 1 #

Patch Set 2 : update #

Total comments: 25

Patch Set 3 : review #

Total comments: 4

Patch Set 4 : remove LOG(ERROR) for debugging #

Patch Set 5 : for submit #

Patch Set 6 : SystemMonitor in test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -212 lines) Patch
M media/midi/midi_manager_unittest.cc View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M media/midi/midi_manager_win.cc View 1 2 3 4 17 chunks +143 lines, -212 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
Takashi Toyoshima
PTAL. This is a base change to fix the issue 472980. But this change itself ...
5 years, 8 months ago (2015-04-06 18:02:14 UTC) #2
Takashi Toyoshima
My change note for the review. https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc File media/midi/midi_manager_win.cc (right): https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc#newcode288 media/midi/midi_manager_win.cc:288: std::string GetManufacturerName(const MidiDeviceInfo& ...
5 years, 8 months ago (2015-04-06 18:02:39 UTC) #3
yukawa
Thank you for deep investigation and improvement. https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc File media/midi/midi_manager_win.cc (right): https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc#newcode288 media/midi/midi_manager_win.cc:288: std::string GetManufacturerName(const ...
5 years, 8 months ago (2015-04-06 18:41:41 UTC) #4
Takashi Toyoshima
https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc File media/midi/midi_manager_win.cc (right): https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc#newcode369 media/midi/midi_manager_win.cc:369: // delivered to the thread through the thread-safe SystemMonitor ...
5 years, 8 months ago (2015-04-06 19:51:48 UTC) #5
Takashi Toyoshima
PTAL. https://codereview.chromium.org/1056333002/diff/40001/media/midi/midi_manager_win.cc File media/midi/midi_manager_win.cc (right): https://codereview.chromium.org/1056333002/diff/40001/media/midi/midi_manager_win.cc#newcode589 media/midi/midi_manager_win.cc:589: LOG(ERROR) << "MIM_CLOSE"; oops, this is mistakenly merged ...
5 years, 8 months ago (2015-04-06 20:03:09 UTC) #6
yukawa
LGTM with few minor/optional comments. https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc File media/midi/midi_manager_win.cc (right): https://codereview.chromium.org/1056333002/diff/20001/media/midi/midi_manager_win.cc#newcode518 media/midi/midi_manager_win.cc:518: UpdateDeviceList(); On 2015/04/06 19:51:47, ...
5 years, 8 months ago (2015-04-06 20:18:48 UTC) #7
Takashi Toyoshima
https://codereview.chromium.org/1056333002/diff/40001/media/midi/midi_manager_win.cc File media/midi/midi_manager_win.cc (right): https://codereview.chromium.org/1056333002/diff/40001/media/midi/midi_manager_win.cc#newcode412 media/midi/midi_manager_win.cc:412: base::SystemMonitor::Get()->RemoveDevicesChangedObserver(this); Oh, good catch. That's a good thing to ...
5 years, 8 months ago (2015-04-07 06:19:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1056333002/80001
5 years, 8 months ago (2015-04-07 06:19:43 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/44169)
5 years, 8 months ago (2015-04-07 08:57:57 UTC) #13
Takashi Toyoshima
Oops, SystemMonitor should be instantiated explicitly in the unit test.
5 years, 8 months ago (2015-04-07 10:20:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1056333002/100001
5 years, 8 months ago (2015-04-07 10:20:34 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 8 months ago (2015-04-07 11:15:52 UTC) #18
commit-bot: I haz the power
5 years, 8 months ago (2015-04-07 11:16:31 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3e47c6dbf899d98f38db45f4cc766bd6a2eca5cd
Cr-Commit-Position: refs/heads/master@{#324031}

Powered by Google App Engine
This is Rietveld 408576698