Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <jni.h> | |
| 6 | |
| 7 #include "base/android/jni_android.h" | |
| 8 #include "base/android/jni_string.h" | |
| 9 #include "base/android/scoped_java_ref.h" | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/logging.h" | |
| 12 #include "content/browser/android/content_view_statics.h" | |
| 13 #include "content/common/android/address_parser.h" | |
| 14 #include "jni/content_view_statics_jni.h" | |
| 15 | |
| 16 using base::android::ConvertJavaStringToUTF16; | |
| 17 using base::android::ConvertUTF16ToJavaString; | |
| 18 using base::android::ScopedJavaLocalRef; | |
| 19 | |
| 20 | |
| 21 // Return the first substring consisting of the address of a physical location. | |
| 22 static jstring FindAddress(JNIEnv* env, jclass clazz, jstring addr) { | |
| 23 string16 content_16 = ConvertJavaStringToUTF16(env, addr); | |
| 24 string16 result_16; | |
| 25 if (content::address_parser::FindAddress(content_16, &result_16)) | |
| 26 return ConvertUTF16ToJavaString(env, result_16).Release(); | |
| 27 return NULL; | |
| 28 } | |
| 29 | |
| 30 namespace content { | |
| 31 | |
| 32 bool RegisterWebViewStatics(JNIEnv* env) { | |
| 33 return RegisterNativesImpl(env) >= 0; | |
| 34 } | |
| 35 | |
| 36 } // namespace content | |
|
brettw
2012/07/13 17:14:24
Nit: 2 spaces before //
| |
| OLD | NEW |