| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_USB_MIDI_INPUT_STREAM_H_ | 5 #ifndef MEDIA_MIDI_USB_MIDI_INPUT_STREAM_H_ |
| 6 #define MEDIA_MIDI_USB_MIDI_INPUT_STREAM_H_ | 6 #define MEDIA_MIDI_USB_MIDI_INPUT_STREAM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "media/base/media_export.h" | 14 #include "media/base/media_export.h" |
| 15 #include "media/midi/usb_midi_jack.h" | 15 #include "media/midi/usb_midi_jack.h" |
| 16 | 16 |
| 17 namespace media { | 17 namespace media { |
| 18 namespace midi { |
| 18 | 19 |
| 19 class UsbMidiDevice; | 20 class UsbMidiDevice; |
| 20 | 21 |
| 21 // UsbMidiInputStream converts USB-MIDI data to MIDI data. | 22 // UsbMidiInputStream converts USB-MIDI data to MIDI data. |
| 22 // See "USB Device Class Definition for MIDI Devices" Release 1.0, | 23 // See "USB Device Class Definition for MIDI Devices" Release 1.0, |
| 23 // Section 4 "USB-MIDI Event Packets" for details. | 24 // Section 4 "USB-MIDI Event Packets" for details. |
| 24 class MEDIA_EXPORT UsbMidiInputStream { | 25 class MEDIA_EXPORT UsbMidiInputStream { |
| 25 public: | 26 public: |
| 26 class MEDIA_EXPORT Delegate { | 27 class MEDIA_EXPORT Delegate { |
| 27 public: | 28 public: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 std::vector<UsbMidiJack> jacks_; | 75 std::vector<UsbMidiJack> jacks_; |
| 75 // A map from UsbMidiJack to its index in |jacks_|. | 76 // A map from UsbMidiJack to its index in |jacks_|. |
| 76 std::map<JackUniqueKey, size_t> jack_dictionary_; | 77 std::map<JackUniqueKey, size_t> jack_dictionary_; |
| 77 | 78 |
| 78 // Not owned | 79 // Not owned |
| 79 Delegate* delegate_; | 80 Delegate* delegate_; |
| 80 | 81 |
| 81 DISALLOW_COPY_AND_ASSIGN(UsbMidiInputStream); | 82 DISALLOW_COPY_AND_ASSIGN(UsbMidiInputStream); |
| 82 }; | 83 }; |
| 83 | 84 |
| 85 } // namespace midi |
| 84 } // namespace media | 86 } // namespace media |
| 85 | 87 |
| 86 #endif // MEDIA_MIDI_USB_MIDI_INPUT_STREAM_H_ | 88 #endif // MEDIA_MIDI_USB_MIDI_INPUT_STREAM_H_ |
| OLD | NEW |