| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_ | 5 #ifndef MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_ |
| 6 #define MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_ | 6 #define MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const ScopedVector<MidiInputPortAndroid>& input_ports() const { | 31 const ScopedVector<MidiInputPortAndroid>& input_ports() const { |
| 32 return input_ports_; | 32 return input_ports_; |
| 33 } | 33 } |
| 34 const ScopedVector<MidiOutputPortAndroid>& output_ports() const { | 34 const ScopedVector<MidiOutputPortAndroid>& output_ports() const { |
| 35 return output_ports_; | 35 return output_ports_; |
| 36 } | 36 } |
| 37 bool HasRawDevice(JNIEnv* env, jobject raw_device) const { | 37 bool HasRawDevice(JNIEnv* env, jobject raw_device) const { |
| 38 return env->IsSameObject(raw_device_.obj(), raw_device); | 38 return env->IsSameObject(raw_device_.obj(), raw_device); |
| 39 } | 39 } |
| 40 | 40 |
| 41 static bool Register(JNIEnv* env); | |
| 42 | |
| 43 private: | 41 private: |
| 44 base::android::ScopedJavaGlobalRef<jobject> raw_device_; | 42 base::android::ScopedJavaGlobalRef<jobject> raw_device_; |
| 45 ScopedVector<MidiInputPortAndroid> input_ports_; | 43 ScopedVector<MidiInputPortAndroid> input_ports_; |
| 46 ScopedVector<MidiOutputPortAndroid> output_ports_; | 44 ScopedVector<MidiOutputPortAndroid> output_ports_; |
| 47 }; | 45 }; |
| 48 | 46 |
| 49 } // namespace midi | 47 } // namespace midi |
| 50 } // namespace media | 48 } // namespace media |
| 51 | 49 |
| 52 #endif // MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_ | 50 #endif // MEDIA_MIDI_MIDI_DEVICE_ANDROID_H_ |
| OLD | NEW |