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 #include "media/midi/midi_output_port_android.h" | 5 #include "media/midi/midi_output_port_android.h" |
6 | 6 |
7 #include "base/android/jni_array.h" | 7 #include "base/android/jni_array.h" |
8 #include "jni/MidiOutputPortAndroid_jni.h" | 8 #include "jni/MidiOutputPortAndroid_jni.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 20 matching lines...) Expand all Loading... |
31 return; | 31 return; |
32 } | 32 } |
33 | 33 |
34 JNIEnv* env = base::android::AttachCurrentThread(); | 34 JNIEnv* env = base::android::AttachCurrentThread(); |
35 ScopedJavaLocalRef<jbyteArray> data_to_pass = | 35 ScopedJavaLocalRef<jbyteArray> data_to_pass = |
36 base::android::ToJavaByteArray(env, &data[0], data.size()); | 36 base::android::ToJavaByteArray(env, &data[0], data.size()); |
37 | 37 |
38 Java_MidiOutputPortAndroid_send(env, raw_port_.obj(), data_to_pass.obj()); | 38 Java_MidiOutputPortAndroid_send(env, raw_port_.obj(), data_to_pass.obj()); |
39 } | 39 } |
40 | 40 |
41 bool MidiOutputPortAndroid::Register(JNIEnv* env) { | |
42 return RegisterNativesImpl(env); | |
43 } | |
44 | |
45 } // namespace midi | 41 } // namespace midi |
46 } // namespace media | 42 } // namespace media |
OLD | NEW |