| 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 "ui/platform_window/android/platform_ime_controller_android.h" | 5 #include "ui/platform_window/android/platform_ime_controller_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "jni/PlatformImeControllerAndroid_jni.h" | 9 #include "jni/PlatformImeControllerAndroid_jni.h" |
| 10 | 10 |
| 11 using base::android::JavaParamRef; |
| 12 using base::android::ScopedJavaLocalRef; |
| 13 |
| 11 namespace ui { | 14 namespace ui { |
| 12 | 15 |
| 13 // static | 16 // static |
| 14 bool PlatformImeControllerAndroid::Register(JNIEnv* env) { | 17 bool PlatformImeControllerAndroid::Register(JNIEnv* env) { |
| 15 return RegisterNativesImpl(env); | 18 return RegisterNativesImpl(env); |
| 16 } | 19 } |
| 17 | 20 |
| 18 PlatformImeControllerAndroid::PlatformImeControllerAndroid() { | 21 PlatformImeControllerAndroid::PlatformImeControllerAndroid() { |
| 19 } | 22 } |
| 20 | 23 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 50 JNIEnv* env = base::android::AttachCurrentThread(); | 53 JNIEnv* env = base::android::AttachCurrentThread(); |
| 51 ScopedJavaLocalRef<jobject> scoped_obj = | 54 ScopedJavaLocalRef<jobject> scoped_obj = |
| 52 java_platform_ime_controller_android_.get(env); | 55 java_platform_ime_controller_android_.get(env); |
| 53 if (scoped_obj.is_null()) | 56 if (scoped_obj.is_null()) |
| 54 return; | 57 return; |
| 55 Java_PlatformImeControllerAndroid_setImeVisibility( | 58 Java_PlatformImeControllerAndroid_setImeVisibility( |
| 56 env, scoped_obj.obj(), visible); | 59 env, scoped_obj.obj(), visible); |
| 57 } | 60 } |
| 58 | 61 |
| 59 } // namespace ui | 62 } // namespace ui |
| OLD | NEW |