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

Unified Diff: content/browser/renderer_host/ime_adapter_android.cc

Issue 1771223002: Migrate *-ime-thread switches to feature API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb imeadapter instead and fixed nits Created 4 years, 9 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
Index: content/browser/renderer_host/ime_adapter_android.cc
diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc
index e5f10e44a667062ebfe7d45ecd888f35f3ab0080..c14297557a19724d4fcbaf021ef0c7ee0dac3e1c 100644
--- a/content/browser/renderer_host/ime_adapter_android.cc
+++ b/content/browser/renderer_host/ime_adapter_android.cc
@@ -11,6 +11,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/android/scoped_java_ref.h"
+#include "base/feature_list.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "content/browser/frame_host/frame_tree.h"
@@ -26,6 +27,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_features.h"
#include "jni/ImeAdapter_jni.h"
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -300,6 +302,12 @@ bool ImeAdapterAndroid::RequestTextInputStateUpdate(
return true;
}
+bool ImeAdapterAndroid::IsImeThreadEnabled(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>&) {
+ return base::FeatureList::IsEnabled(features::kImeThread);
+}
+
void ImeAdapterAndroid::ResetImeAdapter(JNIEnv* env,
const JavaParamRef<jobject>&) {
java_ime_adapter_.reset();

Powered by Google App Engine
This is Rietveld 408576698