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

Unified Diff: media/midi/midi_manager_mac.h

Issue 23379002: Web MIDI: fix multi-threading problem around message buffer handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review #12 (for submmit) Created 7 years, 4 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 | « media/midi/midi_manager.cc ('k') | media/midi/midi_manager_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_mac.h
diff --git a/media/midi/midi_manager_mac.h b/media/midi/midi_manager_mac.h
index ed7b524f5c4d7060de80c0b544ddceb54a8f2e1d..2397b8034f75585f06df97b994bf1983483b8b5e 100644
--- a/media/midi/midi_manager_mac.h
+++ b/media/midi/midi_manager_mac.h
@@ -8,6 +8,7 @@
#include <CoreMIDI/MIDIServices.h>
#include <map>
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -24,20 +25,19 @@ class MEDIA_EXPORT MIDIManagerMac : public MIDIManager {
// MIDIManager implementation.
virtual bool Initialize() OVERRIDE;
virtual void SendMIDIData(MIDIManagerClient* client,
- int port_index,
- const uint8* data,
- size_t length,
+ uint32 port_index,
+ const std::vector<uint8>& data,
double timestamp) OVERRIDE;
private:
// CoreMIDI callback for MIDI data.
// Each callback can contain multiple packets, each of which can contain
// multiple MIDI messages.
- static void ReadMidiDispatch(
+ static void ReadMIDIDispatch(
const MIDIPacketList *pktlist,
void *read_proc_refcon,
void *src_conn_refcon);
- virtual void ReadMidi(MIDIEndpointRef source, const MIDIPacketList *pktlist);
+ virtual void ReadMIDI(MIDIEndpointRef source, const MIDIPacketList *pktlist);
// Helper
static media::MIDIPortInfo GetPortInfoFromEndpoint(MIDIEndpointRef endpoint);
@@ -54,7 +54,7 @@ class MEDIA_EXPORT MIDIManagerMac : public MIDIManager {
MIDIPacketList* packet_list_;
MIDIPacket* midi_packet_;
- typedef std::map<MIDIEndpointRef, int> SourceMap;
+ typedef std::map<MIDIEndpointRef, uint32> SourceMap;
// Keeps track of the index (0-based) for each of our sources.
SourceMap source_map_;
« no previous file with comments | « media/midi/midi_manager.cc ('k') | media/midi/midi_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698