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

Side by Side Diff: media/midi/midi_device_android.h

Issue 1177973003: [Web MIDI] Use Android MIDI API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_
6 #define MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_
7
8 #include <jni.h>
9 #include <string>
10
11 #include "base/android/scoped_java_ref.h"
12 #include "base/memory/scoped_vector.h"
13 #include "media/midi/midi_input_port_android.h"
14
15 namespace media {
16 namespace midi {
17
18 class MidiOutputPortAndroid;
19
20 class MidiDeviceAndroid final {
21 public:
22 MidiDeviceAndroid(JNIEnv* env,
23 jobject raw_device,
24 MidiInputPortAndroid::Delegate* delegate);
25 ~MidiDeviceAndroid();
26
27 std::string GetManufacturer();
28 std::string GetProductName();
29 std::string GetDeviceVersion();
30
31 const ScopedVector<MidiInputPortAndroid>& input_ports() const {
32 return input_ports_;
33 }
34 const ScopedVector<MidiOutputPortAndroid>& output_ports() const {
35 return output_ports_;
36 }
37 jobject raw_device() const { return raw_device_.obj(); }
Takashi Toyoshima 2015/09/07 16:42:20 Maybe "IsEqualTo(const jobject raw_device) const"
yhirano 2015/09/10 11:43:50 Done.
38
39 static bool Register(JNIEnv* env);
40
41 private:
42 base::android::ScopedJavaGlobalRef<jobject> raw_device_;
43 ScopedVector<MidiInputPortAndroid> input_ports_;
44 ScopedVector<MidiOutputPortAndroid> output_ports_;
45 };
46
47 } // namespace midi
48 } // namespace media
49
50 #endif // MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698