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_jni_registrar.h" | 5 #include "media/midi/midi_jni_registrar.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 | |
11 #include "media/midi/midi_device_android.h" | |
12 #include "media/midi/midi_input_port_android.h" | 10 #include "media/midi/midi_input_port_android.h" |
13 #include "media/midi/midi_manager_android.h" | 11 #include "media/midi/midi_manager_android.h" |
14 #include "media/midi/usb_midi_device_android.h" | 12 #include "media/midi/usb_midi_device_android.h" |
15 #include "media/midi/usb_midi_device_factory_android.h" | 13 #include "media/midi/usb_midi_device_factory_android.h" |
16 | 14 |
17 namespace media { | 15 namespace media { |
18 namespace midi { | 16 namespace midi { |
19 | 17 |
20 static base::android::RegistrationMethod kMediaRegisteredMethods[] = { | 18 static base::android::RegistrationMethod kMediaRegisteredMethods[] = { |
21 {"UsbMidiDevice", UsbMidiDeviceAndroid::RegisterUsbMidiDevice}, | 19 {"UsbMidiDevice", UsbMidiDeviceAndroid::RegisterUsbMidiDevice}, |
22 {"UsbMidiDeviceFactory", | 20 {"UsbMidiDeviceFactory", |
23 UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory}, | 21 UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory}, |
24 {"MidiDeviceAndroid", MidiDeviceAndroid::Register}, | |
25 {"MidiManagerAndroid", MidiManagerAndroid::Register}, | 22 {"MidiManagerAndroid", MidiManagerAndroid::Register}, |
26 {"MidiInputPort", MidiInputPortAndroid::Register}, | 23 {"MidiInputPort", MidiInputPortAndroid::Register}, |
27 }; | 24 }; |
28 | 25 |
29 bool RegisterJni(JNIEnv* env) { | 26 bool RegisterJni(JNIEnv* env) { |
30 return base::android::RegisterNativeMethods( | 27 return base::android::RegisterNativeMethods( |
31 env, kMediaRegisteredMethods, arraysize(kMediaRegisteredMethods)); | 28 env, kMediaRegisteredMethods, arraysize(kMediaRegisteredMethods)); |
32 } | 29 } |
33 | 30 |
34 } // namespace midi | 31 } // namespace midi |
35 } // namespace media | 32 } // namespace media |
OLD | NEW |