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

Unified Diff: media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceAndroid.java

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/BUILD.gn ('k') | media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceFactoryAndroid.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceAndroid.java
diff --git a/media/base/android/java/src/org/chromium/media/UsbMidiDeviceAndroid.java b/media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceAndroid.java
similarity index 95%
rename from media/base/android/java/src/org/chromium/media/UsbMidiDeviceAndroid.java
rename to media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceAndroid.java
index c581131fb39a646638985472e7d69ad7b8dc9c57..4bdd5f582046fc7deda3be75b14b8753f32b7bba 100644
--- a/media/base/android/java/src/org/chromium/media/UsbMidiDeviceAndroid.java
+++ b/media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceAndroid.java
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.media;
+package org.chromium.media.midi;
import android.annotation.TargetApi;
import android.hardware.usb.UsbConstants;
@@ -28,7 +28,7 @@ import java.util.Map;
* Owned by its native counterpart declared in usb_midi_device_android.h.
* Refer to that class for general comments.
*/
-@JNINamespace("media")
+@JNINamespace("media::midi")
class UsbMidiDeviceAndroid {
/**
* A connection handle for this device.
@@ -184,14 +184,14 @@ class UsbMidiDeviceAndroid {
*/
private void postOnDataEvent(final int endpointNumber, final byte[] bs) {
mHandler.post(new Runnable() {
- @Override
- public void run() {
- if (mIsClosed) {
- return;
- }
- nativeOnData(mNativePointer, endpointNumber, bs);
+ @Override
+ public void run() {
+ if (mIsClosed) {
+ return;
}
- });
+ nativeOnData(mNativePointer, endpointNumber, bs);
+ }
+ });
}
UsbDevice getUsbDevice() {
@@ -321,7 +321,6 @@ class UsbMidiDeviceAndroid {
return position;
}
- private static native void nativeOnData(long nativeUsbMidiDeviceAndroid,
- int endpointNumber,
- byte[] data);
+ private static native void nativeOnData(
+ long nativeUsbMidiDeviceAndroid, int endpointNumber, byte[] data);
}
« no previous file with comments | « media/midi/BUILD.gn ('k') | media/midi/java/src/org/chromium/media/midi/UsbMidiDeviceFactoryAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698