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

Side by Side Diff: media/midi/midi_device_android.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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_device_android.h" 5 #include "media/midi/midi_device_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "jni/MidiDeviceAndroid_jni.h" 9 #include "jni/MidiDeviceAndroid_jni.h"
10 #include "media/midi/midi_output_port_android.h" 10 #include "media/midi/midi_output_port_android.h"
11 11
12 using base::android::ScopedJavaLocalRef;
13
12 namespace media { 14 namespace media {
13 namespace midi { 15 namespace midi {
14 16
15 MidiDeviceAndroid::MidiDeviceAndroid(JNIEnv* env, 17 MidiDeviceAndroid::MidiDeviceAndroid(JNIEnv* env,
16 jobject raw_device, 18 jobject raw_device,
17 MidiInputPortAndroid::Delegate* delegate) 19 MidiInputPortAndroid::Delegate* delegate)
18 : raw_device_(env, raw_device) { 20 : raw_device_(env, raw_device) {
19 ScopedJavaLocalRef<jobjectArray> raw_input_ports = 21 ScopedJavaLocalRef<jobjectArray> raw_input_ports =
20 Java_MidiDeviceAndroid_getInputPorts(env, raw_device); 22 Java_MidiDeviceAndroid_getInputPorts(env, raw_device);
21 jsize num_input_ports = env->GetArrayLength(raw_input_ports.obj()); 23 jsize num_input_ports = env->GetArrayLength(raw_input_ports.obj());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 std::string MidiDeviceAndroid::GetDeviceVersion() { 57 std::string MidiDeviceAndroid::GetDeviceVersion() {
56 JNIEnv* env = base::android::AttachCurrentThread(); 58 JNIEnv* env = base::android::AttachCurrentThread();
57 ScopedJavaLocalRef<jstring> ret = 59 ScopedJavaLocalRef<jstring> ret =
58 Java_MidiDeviceAndroid_getVersion(env, raw_device_.obj()); 60 Java_MidiDeviceAndroid_getVersion(env, raw_device_.obj());
59 return std::string(env->GetStringUTFChars(ret.obj(), nullptr), 61 return std::string(env->GetStringUTFChars(ret.obj(), nullptr),
60 env->GetStringUTFLength(ret.obj())); 62 env->GetStringUTFLength(ret.obj()));
61 } 63 }
62 64
63 } // namespace midi 65 } // namespace midi
64 } // namespace media 66 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/android/video_capture_device_android.cc ('k') | media/midi/midi_input_port_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698