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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 2752113005: Let ImeAdapterAndroid have the same lifecycle as its Java peer (Closed)
Patch Set: fix tests Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/android/ime_adapter_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 805ef14742218c7afee8bf56d35f40da82d80ee8..5366bc9335a6e03b718a21b7f3e6dca1f9f1d10a 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1087,25 +1087,7 @@ void ContentViewCoreImpl::WasResized(JNIEnv* env,
SendScreenRectsAndResizeWidget();
}
-long ContentViewCoreImpl::GetNativeImeAdapter(
- JNIEnv* env,
- const JavaParamRef<jobject>& obj) {
- RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid();
- if (!rwhva)
- return 0;
- return rwhva->GetNativeImeAdapter();
-}
-
-void ContentViewCoreImpl::ForceUpdateImeAdapter(long native_ime_adapter) {
- JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
- return;
- Java_ContentViewCore_forceUpdateImeAdapter(env, obj, native_ime_adapter);
-}
-
-void ContentViewCoreImpl::UpdateImeAdapter(long native_ime_adapter,
- int text_input_type,
+void ContentViewCoreImpl::UpdateImeAdapter(int text_input_type,
int text_input_flags,
int text_input_mode,
const std::string& text,
@@ -1122,9 +1104,9 @@ void ContentViewCoreImpl::UpdateImeAdapter(long native_ime_adapter,
ScopedJavaLocalRef<jstring> jstring_text = ConvertUTF8ToJavaString(env, text);
Java_ContentViewCore_updateImeAdapter(
- env, obj, native_ime_adapter, text_input_type, text_input_flags,
- text_input_mode, jstring_text, selection_start, selection_end,
- composition_start, composition_end, show_ime_if_needed, reply_to_request);
+ env, obj, text_input_type, text_input_flags, text_input_mode,
+ jstring_text, selection_start, selection_end, composition_start,
+ composition_end, show_ime_if_needed, reply_to_request);
}
void ContentViewCoreImpl::SetAccessibilityEnabled(
@@ -1331,7 +1313,7 @@ jlong Init(JNIEnv* env,
const JavaParamRef<jobject>& jweb_contents,
const JavaParamRef<jobject>& jview_android_delegate,
jlong jwindow_android,
- jfloat dipScale,
+ jfloat dip_scale,
const JavaParamRef<jobject>& retained_objects_set) {
WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
WebContents::FromJavaWebContents(jweb_contents));
@@ -1346,9 +1328,8 @@ jlong Init(JNIEnv* env,
DCHECK(window_android);
window_android->AddChild(view_android);
- // TODO: pass dipScale.
ContentViewCoreImpl* view = new ContentViewCoreImpl(
- env, obj, web_contents, dipScale, retained_objects_set);
+ env, obj, web_contents, dip_scale, retained_objects_set);
return reinterpret_cast<intptr_t>(view);
}
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/android/ime_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698