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

Unified Diff: media/midi/midi_jni_registrar.cc

Issue 1065743003: Reland: Web MIDI: split build rules for media/midi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed patch set Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/midi/midi_jni_registrar.h ('k') | media/midi/midi_manager_usb.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_jni_registrar.cc
diff --git a/media/midi/midi_jni_registrar.cc b/media/midi/midi_jni_registrar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a0028cdb56a9ee4859f199b16f326c7db53a9ede
--- /dev/null
+++ b/media/midi/midi_jni_registrar.cc
@@ -0,0 +1,29 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/midi/midi_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "base/basictypes.h"
+
+#include "media/midi/usb_midi_device_android.h"
+#include "media/midi/usb_midi_device_factory_android.h"
+
+namespace media {
+namespace midi {
+
+static base::android::RegistrationMethod kMediaRegisteredMethods[] = {
+ {"UsbMidiDevice", UsbMidiDeviceAndroid::RegisterUsbMidiDevice},
+ {"UsbMidiDeviceFactory",
+ UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory},
+};
+
+bool RegisterJni(JNIEnv* env) {
+ return base::android::RegisterNativeMethods(
+ env, kMediaRegisteredMethods, arraysize(kMediaRegisteredMethods));
+}
+
+} // namespace midi
+} // namespace media
« no previous file with comments | « media/midi/midi_jni_registrar.h ('k') | media/midi/midi_manager_usb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698