Chromium Code Reviews| Index: media/midi/midi_manager_alsa.h |
| diff --git a/media/midi/midi_manager_alsa.h b/media/midi/midi_manager_alsa.h |
| index cbe03c5fee776a69e1ec715e40a71a7edd936c1e..02fb6ff5c3fcbaef5bd32fcb17e15039a135f606 100644 |
| --- a/media/midi/midi_manager_alsa.h |
| +++ b/media/midi/midi_manager_alsa.h |
| @@ -15,9 +15,28 @@ |
| #include "base/threading/thread.h" |
| #include "media/midi/midi_manager.h" |
| +#if defined(USE_UDEV) |
|
Ryan Sleevi
2015/03/04 19:46:56
Yes, this is fine because it's forced into the ent
|
| +#include "device/udev_linux/scoped_udev.h" |
| +#endif // defined(USE_UDEV) |
| + |
| namespace media { |
| -class MidiManagerAlsa : public MidiManager { |
| +namespace internal { |
| + |
| +// Decodes just \xXX in strings. |
| +MEDIA_EXPORT_PRIVATE std::string UnescapeUdev(const std::string& s); |
|
Takashi Toyoshima
2015/03/04 09:33:37
Do you have any reason to place these two function
wolenetz
2015/03/04 19:28:58
+1. I'm not fully conversant with the pros/cons he
Adam Goode
2015/03/04 19:59:18
Done.
|
| + |
| +// Extracts the manufacturer using heuristics and a variety of sources. |
| +MEDIA_EXPORT_PRIVATE std::string ExtractManufacturer( |
| + const std::string& udev_id_vendor_enc, |
| + const std::string& udev_id_vendor_id, |
| + const std::string& udev_id_vendor_from_database, |
| + const std::string& alsa_name, |
| + const std::string& alsa_longname); |
| + |
| +} // namespace internal |
| + |
| +class MEDIA_EXPORT MidiManagerAlsa : public MidiManager { |
| public: |
| MidiManagerAlsa(); |
| ~MidiManagerAlsa() override; |
| @@ -55,6 +74,11 @@ class MidiManagerAlsa : public MidiManager { |
| typedef std::vector<snd_midi_event_t*> EncoderList; |
| EncoderList encoders_; |
| + // udev, for querying hardware devices. |
| +#if defined(USE_UDEV) |
| + device::ScopedUdevPtr udev_; |
| +#endif // defined(USE_UDEV) |
| + |
| base::Thread send_thread_; |
| base::Thread event_thread_; |