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

Unified Diff: media/midi/midi_manager.h

Issue 662233002: Web MIDI: make MidiManagerMac notify device connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: it->second Created 5 years, 10 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 | « content/renderer/media/midi_message_filter.cc ('k') | media/midi/midi_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager.h
diff --git a/media/midi/midi_manager.h b/media/midi/midi_manager.h
index d7e7e47a1a65ce38497b316a080c396df21d1068..a7c5262d8fd9f8c79dc45d0b61b99bf3e54f96e9 100644
--- a/media/midi/midi_manager.h
+++ b/media/midi/midi_manager.h
@@ -35,10 +35,10 @@ class MEDIA_EXPORT MidiManagerClient {
virtual void AddInputPort(const MidiPortInfo& info) = 0;
virtual void AddOutputPort(const MidiPortInfo& info) = 0;
- // TODO(toyoshim): DisableInputPort(const MidiPortInfo& info) and
- // DisableOutputPort(const MidiPortInfo& info) should be added.
- // On DisableInputPort(), internal states, e.g. received_messages_queues in
- // MidiHost, should be reset.
+ // SetInputPortState() and SetOutputPortState() are called to notify a known
+ // device gets disconnected, or connected again.
+ virtual void SetInputPortState(uint32 port_index, MidiPortState state) = 0;
+ virtual void SetOutputPortState(uint32 port_index, MidiPortState state) = 0;
// CompleteStartSession() is called when platform dependent preparation is
// finished.
@@ -122,6 +122,8 @@ class MEDIA_EXPORT MidiManager {
void AddInputPort(const MidiPortInfo& info);
void AddOutputPort(const MidiPortInfo& info);
+ void SetInputPortState(uint32 port_index, MidiPortState state);
+ void SetOutputPortState(uint32 port_index, MidiPortState state);
// Dispatches to all clients.
// TODO(toyoshim): Fix the mac implementation to use
« no previous file with comments | « content/renderer/media/midi_message_filter.cc ('k') | media/midi/midi_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698