| 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 <utility> |    7 #include <utility> | 
|    8  |    8  | 
|    9 #include "base/logging.h" |    9 #include "base/logging.h" | 
|   10 #include "base/message_loop/message_loop.h" |   10 #include "base/message_loop/message_loop.h" | 
|   11 #include "base/strings/stringprintf.h" |   11 #include "base/strings/stringprintf.h" | 
|   12 #include "media/midi/midi_scheduler.h" |   12 #include "media/midi/midi_scheduler.h" | 
|   13 #include "media/midi/usb_midi_descriptor_parser.h" |   13 #include "media/midi/usb_midi_descriptor_parser.h" | 
|   14  |   14  | 
|   15 namespace media { |  | 
|   16 namespace midi { |   15 namespace midi { | 
|   17  |   16  | 
|   18 MidiManagerUsb::MidiManagerUsb(std::unique_ptr<UsbMidiDevice::Factory> factory) |   17 MidiManagerUsb::MidiManagerUsb(std::unique_ptr<UsbMidiDevice::Factory> factory) | 
|   19     : device_factory_(std::move(factory)) {} |   18     : device_factory_(std::move(factory)) {} | 
|   20  |   19  | 
|   21 MidiManagerUsb::~MidiManagerUsb() { |   20 MidiManagerUsb::~MidiManagerUsb() { | 
|   22   base::AutoLock auto_lock(scheduler_lock_); |   21   base::AutoLock auto_lock(scheduler_lock_); | 
|   23   CHECK(!scheduler_); |   22   CHECK(!scheduler_); | 
|   24 } |   23 } | 
|   25  |   24  | 
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  160       DCHECK_EQ(jacks[j].direction(), UsbMidiJack::DIRECTION_IN); |  159       DCHECK_EQ(jacks[j].direction(), UsbMidiJack::DIRECTION_IN); | 
|  161       input_stream_->Add(jacks[j]); |  160       input_stream_->Add(jacks[j]); | 
|  162       AddInputPort(MidiPortInfo(id, manufacturer, product_name, version, |  161       AddInputPort(MidiPortInfo(id, manufacturer, product_name, version, | 
|  163                                 MIDI_PORT_OPENED)); |  162                                 MIDI_PORT_OPENED)); | 
|  164     } |  163     } | 
|  165   } |  164   } | 
|  166   return true; |  165   return true; | 
|  167 } |  166 } | 
|  168  |  167  | 
|  169 }  // namespace midi |  168 }  // namespace midi | 
|  170 }  // namespace media |  | 
| OLD | NEW |