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

Issue 16025005: Web MIDI API back-end (work-in-progress) (Closed)

Created:
7 years, 6 months ago by Chris Rogers
Modified:
7 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, sail+watch_chromium.org, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Implement Web MIDI API back-end (this relands 16025005 with fix for perf regression) This involves browser-side support and IPC for sending and receiving MIDI messages. Initially support for OSX is included. BUG=163795 R=palmer@chromium.org, piman@chromium.org, scherkus@chromium.org

Patch Set 1 #

Patch Set 2 : add support for multiple clients #

Patch Set 3 : cleanup - multiple clients #

Patch Set 4 : forgot to add midi_manager.cc #

Patch Set 5 : merge #

Total comments: 6

Patch Set 6 : Send MIDI port information to renderer #

Patch Set 7 : fix some formatting #

Patch Set 8 : implement MIDIHostMsg_RequestAccess and MIDIHostMsg_SendData #

Patch Set 9 : only bother IPC of received messages when access requested #

Patch Set 10 : use client_id for access - call accessApproved() #

Patch Set 11 : fix presubmit errors #

Total comments: 5

Patch Set 12 : use int64 in ParamTraits #

Total comments: 41

Patch Set 13 : #

Total comments: 4

Patch Set 14 : remove ParamTraits stuff - more style fixes #

Patch Set 15 : #

Total comments: 8

Patch Set 16 : add stub for non-OSX MIDIManagers #

Total comments: 24

Patch Set 17 : change to new Blink API (abarth changes) #

Patch Set 18 : For now disable sending data - fix IPC thread in renderer #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1182 lines, -1 line) Patch
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_main_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -1 line 0 comments Download
A content/browser/renderer_host/media/midi_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +62 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/midi_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +99 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -0 lines 0 comments Download
M content/common/content_message_generator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
A content/common/media/midi_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +46 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -0 lines 0 comments Download
A content/renderer/media/midi_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +119 lines, -0 lines 0 comments Download
A content/renderer/media/midi_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +204 lines, -0 lines 1 comment Download
A content/renderer/media/renderer_webmidiaccessor_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +41 lines, -0 lines 0 comments Download
A content/renderer/media/renderer_webmidiaccessor_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +43 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +10 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +8 lines, -0 lines 0 comments Download
A media/midi/midi_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +109 lines, -0 lines 0 comments Download
A media/midi/midi_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +67 lines, -0 lines 0 comments Download
A media/midi/midi_manager_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +69 lines, -0 lines 0 comments Download
A media/midi/midi_manager_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +205 lines, -0 lines 0 comments Download
A media/midi/midi_port_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +36 lines, -0 lines 0 comments Download
A media/midi/midi_port_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
scherkus (not reviewing)
Overall I'm liking the structure. It's straight-forward and easy to comprehend. Nice! Can you upload ...
7 years, 6 months ago (2013-06-03 22:44:59 UTC) #1
Chris Rogers
Andrew, thanks for having such a quick look! The Blink side changes are partially landed ...
7 years, 6 months ago (2013-06-04 00:53:03 UTC) #2
Chris Rogers
Andrew I've iterated this a fair bit since the last time you looked. I hope ...
7 years, 6 months ago (2013-06-05 01:20:24 UTC) #3
Chris Rogers
+palmer Hi Chris, I have enough of the IPC in place that it might make ...
7 years, 6 months ago (2013-06-05 01:21:49 UTC) #4
scherkus (not reviewing)
looking really good -- one q about yet-to-be-authorized clients in the renderer I'll follow up ...
7 years, 6 months ago (2013-06-11 02:27:24 UTC) #5
Chris Rogers
On 2013/06/11 02:27:24, scherkus wrote: > looking really good -- one q about yet-to-be-authorized clients ...
7 years, 6 months ago (2013-06-11 02:44:37 UTC) #6
palmer
Some initial thoughts. Let me know when you're getting closer to finishing it and I'll ...
7 years, 6 months ago (2013-06-11 17:29:13 UTC) #7
Chris Rogers
Chris, thanks for looking. https://codereview.chromium.org/16025005/diff/33001/content/common/media/media_param_traits.cc File content/common/media/media_param_traits.cc (right): https://codereview.chromium.org/16025005/diff/33001/content/common/media/media_param_traits.cc#newcode103 content/common/media/media_param_traits.cc:103: m->WriteInt(n); On 2013/06/11 17:29:13, Chromium ...
7 years, 6 months ago (2013-06-11 19:23:25 UTC) #8
scherkus (not reviewing)
https://codereview.chromium.org/16025005/diff/64001/content/browser/renderer_host/media/midi_host.cc File content/browser/renderer_host/media/midi_host.cc (right): https://codereview.chromium.org/16025005/diff/64001/content/browser/renderer_host/media/midi_host.cc#newcode24 content/browser/renderer_host/media/midi_host.cc:24: : midi_manager_(midi_manager) { indent two more spaces https://codereview.chromium.org/16025005/diff/64001/content/browser/renderer_host/media/midi_host.cc#newcode49 content/browser/renderer_host/media/midi_host.cc:49: ...
7 years, 6 months ago (2013-06-12 01:28:47 UTC) #9
Chris Rogers
Thanks Andrew, I've addressed all comments except for the IPC_STRUCT_TRAITS_ stuff (see comment below) https://codereview.chromium.org/16025005/diff/64001/content/browser/renderer_host/media/midi_host.cc ...
7 years, 6 months ago (2013-06-12 20:34:35 UTC) #10
scherkus (not reviewing)
https://codereview.chromium.org/16025005/diff/64001/content/common/media/media_param_traits.h File content/common/media/media_param_traits.h (right): https://codereview.chromium.org/16025005/diff/64001/content/common/media/media_param_traits.h#newcode37 content/common/media/media_param_traits.h:37: struct CONTENT_EXPORT ParamTraits<media::MIDIPortInfoList> { On 2013/06/12 20:34:35, Chris Rogers ...
7 years, 6 months ago (2013-06-13 02:05:41 UTC) #11
Chris Rogers
PTAL - latest patch uses IPC_STRUCT_TRAITS_BEGIN, which works as you explained it - thanks https://codereview.chromium.org/16025005/diff/77001/media/midi/midi_manager.h ...
7 years, 6 months ago (2013-06-14 00:47:33 UTC) #12
scherkus (not reviewing)
few more tiny nits, but this is pretty much "ell gee tee emm" what are ...
7 years, 6 months ago (2013-06-14 00:54:48 UTC) #13
ddorwin
Drive-by nit https://codereview.chromium.org/16025005/diff/99001/content/renderer/media/renderer_webmidiaccessor_impl.h File content/renderer/media/renderer_webmidiaccessor_impl.h (right): https://codereview.chromium.org/16025005/diff/99001/content/renderer/media/renderer_webmidiaccessor_impl.h#newcode5 content/renderer/media/renderer_webmidiaccessor_impl.h:5: #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBMIDIACCESOR_IMPL_H_ s/ACCESOR/ACCESSOR/
7 years, 6 months ago (2013-06-18 05:02:16 UTC) #14
palmer
LGTM, with nits/questions/observations. https://codereview.chromium.org/16025005/diff/118001/content/browser/renderer_host/media/midi_host.cc File content/browser/renderer_host/media/midi_host.cc (right): https://codereview.chromium.org/16025005/diff/118001/content/browser/renderer_host/media/midi_host.cc#newcode71 content/browser/renderer_host/media/midi_host.cc:71: client_id, Nit: Indent one more space ...
7 years, 6 months ago (2013-06-19 21:39:15 UTC) #15
Chris Rogers
jam: OWNERS review for ipc and content? https://codereview.chromium.org/16025005/diff/99001/content/renderer/media/midi_message_filter.cc File content/renderer/media/midi_message_filter.cc (right): https://codereview.chromium.org/16025005/diff/99001/content/renderer/media/midi_message_filter.cc#newcode127 content/renderer/media/midi_message_filter.cc:127: UTF8ToUTF16(inputs[i].id), On ...
7 years, 6 months ago (2013-06-20 17:41:32 UTC) #16
piman
https://codereview.chromium.org/16025005/diff/118001/content/browser/renderer_host/media/midi_host.cc File content/browser/renderer_host/media/midi_host.cc (right): https://codereview.chromium.org/16025005/diff/118001/content/browser/renderer_host/media/midi_host.cc#newcode82 content/browser/renderer_host/media/midi_host.cc:82: midi_manager_->SendMIDIData(port, data.data(), data.size(), timestamp); High-level question: this runs on ...
7 years, 6 months ago (2013-06-20 20:16:19 UTC) #17
Chris Rogers
piman: PTAL https://codereview.chromium.org/16025005/diff/118001/content/browser/renderer_host/media/midi_host.cc File content/browser/renderer_host/media/midi_host.cc (right): https://codereview.chromium.org/16025005/diff/118001/content/browser/renderer_host/media/midi_host.cc#newcode82 content/browser/renderer_host/media/midi_host.cc:82: midi_manager_->SendMIDIData(port, data.data(), data.size(), timestamp); On 2013/06/20 20:16:20, ...
7 years, 6 months ago (2013-06-21 23:04:11 UTC) #18
piman
Just one thing, LGTM after that. https://codereview.chromium.org/16025005/diff/134001/content/renderer/media/midi_message_filter.cc File content/renderer/media/midi_message_filter.cc (right): https://codereview.chromium.org/16025005/diff/134001/content/renderer/media/midi_message_filter.cc#newcode71 content/renderer/media/midi_message_filter.cc:71: client_message_loop_ = base::MessageLoopProxy::current(); ...
7 years, 6 months ago (2013-06-21 23:16:13 UTC) #19
scherkus (not reviewing)
oh crap I never gave my official blessing! lgtm % piman's nit!
7 years, 6 months ago (2013-06-21 23:29:48 UTC) #20
Chris Rogers
7 years, 6 months ago (2013-06-22 00:55:57 UTC) #21
Message was sent while issue was closed.
Committed patchset #18 manually as r207983.

Powered by Google App Engine
This is Rietveld 408576698