diff options
Diffstat (limited to 'chromium/media/midi/midi_manager.h')
-rw-r--r-- | chromium/media/midi/midi_manager.h | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/chromium/media/midi/midi_manager.h b/chromium/media/midi/midi_manager.h index 6a301a942d9..f42a40de769 100644 --- a/chromium/media/midi/midi_manager.h +++ b/chromium/media/midi/midi_manager.h @@ -9,16 +9,10 @@ #include <vector> #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop_proxy.h" #include "base/synchronization/lock.h" #include "media/base/media_export.h" #include "media/midi/midi_port_info.h" -namespace base { -class Thread; -} - namespace media { // A MIDIManagerClient registers with the MIDIManager to receive MIDI data. @@ -63,17 +57,18 @@ class MEDIA_EXPORT MIDIManager { // A client calls ReleaseSession() to stop receiving MIDI data. void EndSession(MIDIManagerClient* client); - // DispatchSendMIDIData() schedules one or more messages to be sent - // at the given time on a dedicated thread. + // DispatchSendMIDIData() is called when MIDI data should be sent to the MIDI + // system. + // This method is supposed to return immediately and should not block. // |port_index| represents the specific output port from output_ports(). // |data| represents a series of bytes encoding one or more MIDI messages. // |length| is the number of bytes in |data|. // |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, - uint32 port_index, - const std::vector<uint8>& data, - double timestamp); + virtual void DispatchSendMIDIData(MIDIManagerClient* client, + uint32 port_index, + const std::vector<uint8>& data, + double timestamp) = 0; // input_ports() is a list of MIDI ports for receiving MIDI data. // Each individual port in this list can be identified by its @@ -89,13 +84,6 @@ class MEDIA_EXPORT MIDIManager { // Initializes the MIDI system, returning |true| on success. virtual bool Initialize() = 0; - // Implements the platform-specific details of sending MIDI data. - // This function runs on MIDISendThread. - virtual void SendMIDIData(MIDIManagerClient* client, - uint32 port_index, - const std::vector<uint8>& data, - double timestamp) = 0; - void AddInputPort(const MIDIPortInfo& info); void AddOutputPort(const MIDIPortInfo& info); @@ -105,9 +93,6 @@ class MEDIA_EXPORT MIDIManager { size_t length, double timestamp); - // Checks if current thread is MIDISendThread. - bool CurrentlyOnMIDISendThread(); - bool initialized_; // Keeps track of all clients who wish to receive MIDI data. @@ -120,11 +105,6 @@ class MEDIA_EXPORT MIDIManager { MIDIPortInfoList input_ports_; MIDIPortInfoList output_ports_; - // |send_thread_| is used to send MIDI data by calling the platform-specific - // API. - scoped_ptr<base::Thread> send_thread_; - scoped_refptr<base::MessageLoopProxy> send_message_loop_; - DISALLOW_COPY_AND_ASSIGN(MIDIManager); }; |