1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_
6 #define MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_
11 #include "base/android/scoped_java_ref.h"
12 #include "base/memory/scoped_vector.h"
13 #include "media/midi/midi_input_port_android.h"
18 class MidiOutputPortAndroid
;
20 class MidiDeviceAndroid final
{
22 MidiDeviceAndroid(JNIEnv
* env
,
24 MidiInputPortAndroid::Delegate
* delegate
);
27 std::string
GetManufacturer();
28 std::string
GetProductName();
29 std::string
GetDeviceVersion();
31 const ScopedVector
<MidiInputPortAndroid
>& input_ports() const {
34 const ScopedVector
<MidiOutputPortAndroid
>& output_ports() const {
37 bool HasRawDevice(JNIEnv
* env
, jobject raw_device
) const {
38 return env
->IsSameObject(raw_device_
.obj(), raw_device
);
41 static bool Register(JNIEnv
* env
);
44 base::android::ScopedJavaGlobalRef
<jobject
> raw_device_
;
45 ScopedVector
<MidiInputPortAndroid
> input_ports_
;
46 ScopedVector
<MidiOutputPortAndroid
> output_ports_
;
52 #endif // MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_