Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1101)

Unified Diff: media/midi/usb_midi_device.h

Issue 107513012: [WebMIDI] Introduce UsbMidi{Input, Output}Stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-midi-parser
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/midi/midi_message_util.h ('k') | media/midi/usb_midi_input_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/usb_midi_device.h
diff --git a/media/midi/usb_midi_device.h b/media/midi/usb_midi_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..3f29d64f985c626fe7b195df71a609de0b35a8bb
--- /dev/null
+++ b/media/midi/usb_midi_device.h
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_MIDI_USB_MIDI_DEVICE_H_
+#define MEDIA_MIDI_USB_MIDI_DEVICE_H_
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+// UsbMidiDevice represents a USB-MIDI device.
+// This is an interface class and each platform-dependent implementation class
+// will be a derived class.
+class MEDIA_EXPORT UsbMidiDevice {
+ public:
+ virtual ~UsbMidiDevice() {}
+
+ // Returns the descriptor of this device.
+ virtual std::vector<uint8> GetDescriptor() = 0;
+
+ // Sends |data| to the given USB endpoint of this device.
+ virtual void Send(int endpoint_number, const std::vector<uint8>& data) = 0;
+};
+
+} // namespace media
+
+#endif // MEDIA_MIDI_USB_MIDI_DEVICE_H_
« no previous file with comments | « media/midi/midi_message_util.h ('k') | media/midi/usb_midi_input_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698