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

Unified Diff: content/renderer/media/midi_message_filter.h

Issue 1054913002: Web MIDI: do not manage connection state from embedder side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/midi_message_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/midi_message_filter.h
diff --git a/content/renderer/media/midi_message_filter.h b/content/renderer/media/midi_message_filter.h
index cbad680dd916a3864abfdfd47b39f97f2c01da8f..b4a073c638fb47f2e753442ddf4d037b2742f1cd 100644
--- a/content/renderer/media/midi_message_filter.h
+++ b/content/renderer/media/midi_message_filter.h
@@ -46,6 +46,9 @@ class CONTENT_EXPORT MidiMessageFilter : public IPC::MessageFilter {
static blink::WebMIDIAccessorClient::MIDIPortState ToBlinkState(
media::MidiPortState state) {
+ // "open" status is separately managed by blink per MIDIAccess instance.
+ if (state == media::MIDI_PORT_OPENED)
+ state = media::MIDI_PORT_CONNECTED;
return static_cast<blink::WebMIDIAccessorClient::MIDIPortState>(state);
}
« no previous file with comments | « no previous file | content/renderer/media/midi_message_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698