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

Side by Side Diff: ui/platform_window/android/platform_ime_controller_android.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( 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
« no previous file with comments | « ui/gl/android/surface_texture.cc ('k') | ui/platform_window/android/platform_window_android.cc » ('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 "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
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 void PlatformImeControllerAndroid::UpdateTextInputState( 33 void PlatformImeControllerAndroid::UpdateTextInputState(
34 const TextInputState& state) { 34 const TextInputState& state) {
35 JNIEnv* env = base::android::AttachCurrentThread(); 35 JNIEnv* env = base::android::AttachCurrentThread();
36 ScopedJavaLocalRef<jobject> scoped_obj = 36 ScopedJavaLocalRef<jobject> scoped_obj =
37 java_platform_ime_controller_android_.get(env); 37 java_platform_ime_controller_android_.get(env);
38 if (scoped_obj.is_null()) 38 if (scoped_obj.is_null())
39 return; 39 return;
40 Java_PlatformImeControllerAndroid_updateTextInputState( 40 Java_PlatformImeControllerAndroid_updateTextInputState(
41 env, 41 env, scoped_obj, state.type, state.flags,
42 scoped_obj.obj(), 42 base::android::ConvertUTF8ToJavaString(env, state.text),
43 state.type, 43 state.selection_start, state.selection_end, state.composition_start,
44 state.flags,
45 base::android::ConvertUTF8ToJavaString(env, state.text).obj(),
46 state.selection_start,
47 state.selection_end,
48 state.composition_start,
49 state.composition_end); 44 state.composition_end);
50 } 45 }
51 46
52 void PlatformImeControllerAndroid::SetImeVisibility(bool visible) { 47 void PlatformImeControllerAndroid::SetImeVisibility(bool visible) {
53 JNIEnv* env = base::android::AttachCurrentThread(); 48 JNIEnv* env = base::android::AttachCurrentThread();
54 ScopedJavaLocalRef<jobject> scoped_obj = 49 ScopedJavaLocalRef<jobject> scoped_obj =
55 java_platform_ime_controller_android_.get(env); 50 java_platform_ime_controller_android_.get(env);
56 if (scoped_obj.is_null()) 51 if (scoped_obj.is_null())
57 return; 52 return;
58 Java_PlatformImeControllerAndroid_setImeVisibility( 53 Java_PlatformImeControllerAndroid_setImeVisibility(env, scoped_obj, visible);
59 env, scoped_obj.obj(), visible);
60 } 54 }
61 55
62 } // namespace ui 56 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gl/android/surface_texture.cc ('k') | ui/platform_window/android/platform_window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698