Chromium Code Reviews| Index: media/midi/midi_manager.h |
| diff --git a/media/midi/midi_manager.h b/media/midi/midi_manager.h |
| index c2b26ab1b136df59fb1cf1a04cdf35c98607d9ca..646311835ae0c863272f962f99a55acab4a8c7ca 100644 |
| --- a/media/midi/midi_manager.h |
| +++ b/media/midi/midi_manager.h |
| @@ -6,6 +6,7 @@ |
| #define MEDIA_MIDI_MIDI_MANAGER_H_ |
| #include <set> |
| +#include <vector> |
| #include "base/basictypes.h" |
| #include "base/memory/scoped_ptr.h" |
| @@ -70,9 +71,8 @@ class MEDIA_EXPORT MIDIManager { |
| // |timestamp| is the time to send the data, in seconds. A value of 0 |
| // means send "now" or as soon as possible. |
| void DispatchSendMIDIData(MIDIManagerClient* client, |
| - int port_index, |
| - const uint8* data, |
| - size_t length, |
| + size_t port_index, |
| + const std::vector<uint8>& data, |
| double timestamp); |
| // input_ports() is a list of MIDI ports for receiving MIDI data. |
| @@ -90,21 +90,24 @@ class MEDIA_EXPORT MIDIManager { |
| virtual bool Initialize() = 0; |
| // Implements the platform-specific details of sending MIDI data. |
| + // This function runs on MIDISendThread. |
| virtual void SendMIDIData(MIDIManagerClient* client, |
| - int port_index, |
| - const uint8* data, |
| - size_t length, |
| + size_t port_index, |
| + const std::vector<uint8>& data, |
| double timestamp) = 0; |
| void AddInputPort(const MIDIPortInfo& info); |
| void AddOutputPort(const MIDIPortInfo& info); |
| // Dispatches to all clients. |
| - void ReceiveMIDIData( |
| - int port_index, |
| - const uint8* data, |
| - size_t length, |
| - double timestamp); |
| + // TODO(toyoshim): Make |port_index| size_t to be consistent with send side. |
|
palmer
2013/08/26 17:43:25
uint32_t. And, why not do it now?
Takashi Toyoshima
2013/08/27 07:14:33
Maybe I should split all type related changes to a
|
| + void ReceiveMIDIData(int port_index, |
| + const uint8* data, |
| + size_t length, |
| + double timestamp); |
| + |
| + // Checks if current thread is MIDISendThread. |
| + bool CurrentlyOnMIDISendThread(); |
| bool initialized_; |