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

Unified Diff: media/midi/midi_manager_mac.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: media/midi/midi_manager_mac.h
diff --git a/media/midi/midi_manager_mac.h b/media/midi/midi_manager_mac.h
index f7179ec18a7494b3f1181481a59184053dc3d4f1..e8e44748176c858e12033c703117e26feda21f02 100644
--- a/media/midi/midi_manager_mac.h
+++ b/media/midi/midi_manager_mac.h
@@ -42,13 +42,18 @@ class MEDIA_EXPORT MidiManagerMac : public MidiManager {
// StartInitialization().
void InitializeCoreMIDI();
+ // CoreMIDI callback for MIDI notification.
+ // Receives MIDI related event notifications from CoreMIDI.
+ static void ReceiveMidiNotifyDispatch(const MIDINotification* message,
+ void* refcon);
+ void ReceiveMidiNotify(const MIDINotification* message);
+
// CoreMIDI callback for MIDI data.
// Each callback can contain multiple packets, each of which can contain
// multiple MIDI messages.
- static void ReadMidiDispatch(
- const MIDIPacketList *pktlist,
- void *read_proc_refcon,
- void *src_conn_refcon);
+ static void ReadMidiDispatch(const MIDIPacketList* packet_list,
+ void* read_proc_refcon,
+ void* src_conn_refcon);
virtual void ReadMidi(MIDIEndpointRef source, const MIDIPacketList *pktlist);
// An internal callback that runs on MidiSendThread.
@@ -67,13 +72,13 @@ class MEDIA_EXPORT MidiManagerMac : public MidiManager {
MIDIPacketList* packet_list_;
MIDIPacket* midi_packet_;
- typedef std::map<MIDIEndpointRef, uint32> SourceMap;
-
// Keeps track of the index (0-based) for each of our sources.
+ typedef std::map<MIDIEndpointRef, uint32> SourceMap;
SourceMap source_map_;
// Keeps track of all destinations.
- std::vector<MIDIEndpointRef> destinations_;
+ typedef std::vector<MIDIEndpointRef> DestinationVector;
+ DestinationVector destinations_;
// |client_thread_| is used to handle platform dependent operations.
base::Thread client_thread_;

Powered by Google App Engine
This is Rietveld 408576698