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_input_port_android.h" | 5 #include "media/midi/midi_input_port_android.h" |
6 | 6 |
7 #include "base/android/jni_array.h" | 7 #include "base/android/jni_array.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "jni/MidiInputPortAndroid_jni.h" | 9 #include "jni/MidiInputPortAndroid_jni.h" |
10 | 10 |
| 11 using base::android::JavaParamRef; |
| 12 |
11 namespace media { | 13 namespace media { |
12 namespace midi { | 14 namespace midi { |
13 | 15 |
14 MidiInputPortAndroid::MidiInputPortAndroid(JNIEnv* env, | 16 MidiInputPortAndroid::MidiInputPortAndroid(JNIEnv* env, |
15 jobject raw, | 17 jobject raw, |
16 Delegate* delegate) | 18 Delegate* delegate) |
17 : raw_port_(env, raw), delegate_(delegate) {} | 19 : raw_port_(env, raw), delegate_(delegate) {} |
18 | 20 |
19 MidiInputPortAndroid::~MidiInputPortAndroid() { | 21 MidiInputPortAndroid::~MidiInputPortAndroid() { |
20 Close(); | 22 Close(); |
(...skipping 29 matching lines...) Expand all Loading... |
50 timestamp / base::TimeTicks::kNanosecondsPerMicrosecond); | 52 timestamp / base::TimeTicks::kNanosecondsPerMicrosecond); |
51 delegate_->OnReceivedData(this, &bytes[offset], size, timestamp_to_pass); | 53 delegate_->OnReceivedData(this, &bytes[offset], size, timestamp_to_pass); |
52 } | 54 } |
53 | 55 |
54 bool MidiInputPortAndroid::Register(JNIEnv* env) { | 56 bool MidiInputPortAndroid::Register(JNIEnv* env) { |
55 return RegisterNativesImpl(env); | 57 return RegisterNativesImpl(env); |
56 } | 58 } |
57 | 59 |
58 } // namespace midi | 60 } // namespace midi |
59 } // namespace media | 61 } // namespace media |
OLD | NEW |