| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_MIDI_MIDI_MANAGER_H_ | 5 #ifndef MEDIA_MIDI_MIDI_MANAGER_H_ |
| 6 #define MEDIA_MIDI_MIDI_MANAGER_H_ | 6 #define MEDIA_MIDI_MIDI_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
| 16 #include "media/midi/midi_port_info.h" | 16 #include "media/midi/midi_port_info.h" |
| 17 #include "media/midi/midi_result.h" | 17 #include "media/midi/midi_result.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class SingleThreadTaskRunner; | 20 class SingleThreadTaskRunner; |
| 21 } // namespace base | 21 } // namespace base |
| 22 | 22 |
| 23 namespace media { | 23 namespace media { |
| 24 namespace midi { |
| 24 | 25 |
| 25 // A MidiManagerClient registers with the MidiManager to receive MIDI data. | 26 // A MidiManagerClient registers with the MidiManager to receive MIDI data. |
| 26 // See MidiManager::RequestAccess() and MidiManager::ReleaseAccess() | 27 // See MidiManager::RequestAccess() and MidiManager::ReleaseAccess() |
| 27 // for details. | 28 // for details. |
| 28 class MEDIA_EXPORT MidiManagerClient { | 29 class MEDIA_EXPORT MidiManagerClient { |
| 29 public: | 30 public: |
| 30 virtual ~MidiManagerClient() {} | 31 virtual ~MidiManagerClient() {} |
| 31 | 32 |
| 32 // AddInputPort() and AddOutputPort() are called before CompleteStartSession() | 33 // AddInputPort() and AddOutputPort() are called before CompleteStartSession() |
| 33 // is called to notify existing MIDI ports, and also called after that to | 34 // is called to notify existing MIDI ports, and also called after that to |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 MidiPortInfoList input_ports_; | 177 MidiPortInfoList input_ports_; |
| 177 MidiPortInfoList output_ports_; | 178 MidiPortInfoList output_ports_; |
| 178 | 179 |
| 179 // Protects access to |clients_|, |pending_clients_|, |initialized_|, | 180 // Protects access to |clients_|, |pending_clients_|, |initialized_|, |
| 180 // |result_|, |input_ports_| and |output_ports_|. | 181 // |result_|, |input_ports_| and |output_ports_|. |
| 181 base::Lock lock_; | 182 base::Lock lock_; |
| 182 | 183 |
| 183 DISALLOW_COPY_AND_ASSIGN(MidiManager); | 184 DISALLOW_COPY_AND_ASSIGN(MidiManager); |
| 184 }; | 185 }; |
| 185 | 186 |
| 187 } // namespace midi |
| 186 } // namespace media | 188 } // namespace media |
| 187 | 189 |
| 188 #endif // MEDIA_MIDI_MIDI_MANAGER_H_ | 190 #endif // MEDIA_MIDI_MIDI_MANAGER_H_ |
| OLD | NEW |