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

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

Issue 2418493002: //media/midi: use top level namespace midi rather than media.midi (Closed)
Patch Set: TAG name change s/media_midi/midi/ Created 4 years, 2 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
« no previous file with comments | « media/midi/midi_device_android.h ('k') | media/midi/midi_input_port_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "jni/MidiDeviceAndroid_jni.h" 10 #include "jni/MidiDeviceAndroid_jni.h"
11 #include "media/midi/midi_output_port_android.h" 11 #include "media/midi/midi_output_port_android.h"
12 12
13 using base::android::ScopedJavaLocalRef; 13 using base::android::ScopedJavaLocalRef;
14 14
15 namespace media {
16 namespace midi { 15 namespace midi {
17 16
18 namespace { 17 namespace {
19 18
20 std::string ConvertMaybeJavaString(JNIEnv* env, 19 std::string ConvertMaybeJavaString(JNIEnv* env,
21 const base::android::JavaRef<jstring>& str) { 20 const base::android::JavaRef<jstring>& str) {
22 if (!str.obj()) 21 if (!str.obj())
23 return std::string(); 22 return std::string();
24 return base::android::ConvertJavaStringToUTF8(str); 23 return base::android::ConvertJavaStringToUTF8(str);
25 } 24 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 env, Java_MidiDeviceAndroid_getProduct(env, raw_device_)); 60 env, Java_MidiDeviceAndroid_getProduct(env, raw_device_));
62 } 61 }
63 62
64 std::string MidiDeviceAndroid::GetDeviceVersion() { 63 std::string MidiDeviceAndroid::GetDeviceVersion() {
65 JNIEnv* env = base::android::AttachCurrentThread(); 64 JNIEnv* env = base::android::AttachCurrentThread();
66 return ConvertMaybeJavaString( 65 return ConvertMaybeJavaString(
67 env, Java_MidiDeviceAndroid_getVersion(env, raw_device_)); 66 env, Java_MidiDeviceAndroid_getVersion(env, raw_device_));
68 } 67 }
69 68
70 } // namespace midi 69 } // namespace midi
71 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_device_android.h ('k') | media/midi/midi_input_port_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698