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 #include "media/midi/midi_manager_usb.h" | 5 #include "media/midi/midi_manager_usb.h" |
6 | 6 |
7 #include "base/callback.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
12 #include "media/midi/midi_scheduler.h" | 10 #include "media/midi/midi_scheduler.h" |
13 #include "media/midi/usb_midi_descriptor_parser.h" | 11 #include "media/midi/usb_midi_descriptor_parser.h" |
14 #include "media/midi/usb_midi_device.h" | |
15 #include "media/midi/usb_midi_input_stream.h" | |
16 #include "media/midi/usb_midi_jack.h" | |
17 #include "media/midi/usb_midi_output_stream.h" | |
18 | 12 |
19 namespace media { | 13 namespace media { |
20 namespace midi { | 14 namespace midi { |
21 | 15 |
22 MidiManagerUsb::MidiManagerUsb(scoped_ptr<UsbMidiDevice::Factory> factory) | 16 MidiManagerUsb::MidiManagerUsb(scoped_ptr<UsbMidiDevice::Factory> factory) |
23 : device_factory_(factory.Pass()) { | 17 : device_factory_(factory.Pass()) { |
24 } | 18 } |
25 | 19 |
26 MidiManagerUsb::~MidiManagerUsb() { | 20 MidiManagerUsb::~MidiManagerUsb() { |
27 } | 21 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 input_stream_->Add(jacks[j]); | 148 input_stream_->Add(jacks[j]); |
155 AddInputPort(MidiPortInfo(id, manufacturer, product_name, version, | 149 AddInputPort(MidiPortInfo(id, manufacturer, product_name, version, |
156 MIDI_PORT_OPENED)); | 150 MIDI_PORT_OPENED)); |
157 } | 151 } |
158 } | 152 } |
159 return true; | 153 return true; |
160 } | 154 } |
161 | 155 |
162 } // namespace midi | 156 } // namespace midi |
163 } // namespace media | 157 } // namespace media |
OLD | NEW |