Index: media/midi/midi_manager.cc |
diff --git a/media/midi/midi_manager.cc b/media/midi/midi_manager.cc |
index 05fcfa45a96f215af0f079c64717fa8182e0e251..8d0bf5088d57654ff4e9cf606c5b99775c0fb43e 100644 |
--- a/media/midi/midi_manager.cc |
+++ b/media/midi/midi_manager.cc |
@@ -6,6 +6,7 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
+#include "base/message_loop/message_loop.h" |
#include "base/threading/thread.h" |
namespace media { |
@@ -62,10 +63,13 @@ void MIDIManager::ReceiveMIDIData( |
(*i)->ReceiveMIDIData(port_index, data, length, timestamp); |
} |
+bool MIDIManager::CurrentlyOnMIDISendThread() { |
+ return send_thread_->message_loop() == base::MessageLoop::current(); |
+} |
+ |
void MIDIManager::DispatchSendMIDIData(MIDIManagerClient* client, |
- int port_index, |
- const uint8* data, |
- size_t length, |
+ size_t port_index, |
+ const std::vector<uint8>& data, |
double timestamp) { |
// Lazily create the thread when first needed. |
if (!send_thread_) { |
@@ -77,7 +81,7 @@ void MIDIManager::DispatchSendMIDIData(MIDIManagerClient* client, |
send_message_loop_->PostTask( |
FROM_HERE, |
base::Bind(&MIDIManager::SendMIDIData, base::Unretained(this), |
- client, port_index, data, length, timestamp)); |
+ client, port_index, data, timestamp)); |
} |
} // namespace media |