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

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

Issue 662233002: Web MIDI: make MidiManagerMac notify device connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + cleanup Created 6 years, 2 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
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 f7e1a8474a49172d1ab6a8a9a1c481449c9ebc3f..27d2df33596186351597eb64156e0b92fc8e4ba1 100644
--- a/content/renderer/media/midi_message_filter.h
+++ b/content/renderer/media/midi_message_filter.h
@@ -77,6 +77,12 @@ class CONTENT_EXPORT MidiMessageFilter : public IPC::MessageFilter {
void OnAddInputPort(media::MidiPortInfo info);
void OnAddOutputPort(media::MidiPortInfo info);
+ // These functions are called to notify the recipient that a device that is
+ // notified via OnAddInputPort() or OnAddOutputPort() gets disconnected, or
+ // connected again.
+ void OnSetInputPortState(uint32 port, bool connected);
+ void OnSetOutputPortState(uint32 port, bool connected);
+
// Called when the browser process has sent MIDI data containing one or
// more messages.
void OnDataReceived(uint32 port,
@@ -93,6 +99,8 @@ class CONTENT_EXPORT MidiMessageFilter : public IPC::MessageFilter {
void HandleAddInputPort(media::MidiPortInfo info);
void HandleAddOutputPort(media::MidiPortInfo info);
+ void HandleSetInputPortState(uint32 port, bool connected);
+ void HandleSetOutputPortState(uint32 port, bool connected);
void HandleDataReceived(uint32 port,
const std::vector<uint8>& data,

Powered by Google App Engine
This is Rietveld 408576698