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

Unified Diff: blimp/client/app/android/ime_helper_dialog.cc

Issue 2261853002: Changed Blimp IME to use PopUp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ime_popup
Patch Set: Used AlertDialog from support.v7 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 side-by-side diff with in-line comments
Download patch
Index: blimp/client/app/android/ime_helper_dialog.cc
diff --git a/blimp/client/app/android/web_input_box.cc b/blimp/client/app/android/ime_helper_dialog.cc
similarity index 60%
rename from blimp/client/app/android/web_input_box.cc
rename to blimp/client/app/android/ime_helper_dialog.cc
index 444cc5b4b224d887ed5a866b055f4f80bb312281..698424789b6b109c6944a7759831dcc7f03bf995 100644
--- a/blimp/client/app/android/web_input_box.cc
+++ b/blimp/client/app/android/ime_helper_dialog.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/client/app/android/web_input_box.h"
+#include "blimp/client/app/android/ime_helper_dialog.h"
#include "base/android/jni_string.h"
#include "blimp/client/app/android/blimp_client_session_android.h"
#include "blimp/client/core/contents/ime_feature.h"
-#include "jni/WebInputBox_jni.h"
+#include "jni/ImeHelperDialog_jni.h"
#include "ui/base/ime/text_input_type.h"
using base::android::JavaParamRef;
@@ -22,47 +22,48 @@ static jlong Init(JNIEnv* env,
BlimpClientSessionAndroid::FromJavaObject(env,
blimp_client_session.obj());
return reinterpret_cast<intptr_t>(
- new WebInputBox(env, jobj, client_session->GetImeFeature()));
+ new ImeHelperDialog(env, jobj, client_session->GetImeFeature()));
}
// static
-bool WebInputBox::RegisterJni(JNIEnv* env) {
+bool ImeHelperDialog::RegisterJni(JNIEnv* env) {
return RegisterNativesImpl(env);
}
-WebInputBox::WebInputBox(JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jobj,
- ImeFeature* ime_feature) {
+ImeHelperDialog::ImeHelperDialog(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jobj,
+ ImeFeature* ime_feature) {
java_obj_.Reset(env, jobj);
ime_feature_ = ime_feature;
ime_feature_->set_delegate(this);
}
-WebInputBox::~WebInputBox() {
+ImeHelperDialog::~ImeHelperDialog() {
ime_feature_->set_delegate(nullptr);
}
-void WebInputBox::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
+void ImeHelperDialog::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
delete this;
}
-void WebInputBox::OnShowImeRequested(ui::TextInputType input_type,
- const std::string& text) {
+void ImeHelperDialog::OnShowImeRequested(ui::TextInputType input_type,
+ const std::string& text) {
JNIEnv* env = base::android::AttachCurrentThread();
DCHECK_NE(ui::TEXT_INPUT_TYPE_NONE, input_type);
- Java_WebInputBox_onShowImeRequested(
+ Java_ImeHelperDialog_onShowImeRequested(
env, java_obj_, input_type,
base::android::ConvertUTF8ToJavaString(env, text));
}
-void WebInputBox::OnHideImeRequested() {
+void ImeHelperDialog::OnHideImeRequested() {
JNIEnv* env = base::android::AttachCurrentThread();
- Java_WebInputBox_onHideImeRequested(env, java_obj_);
+ Java_ImeHelperDialog_onHideImeRequested(env, java_obj_);
}
-void WebInputBox::OnImeTextEntered(JNIEnv* env,
- const JavaParamRef<jobject>& jobj,
- const JavaParamRef<jstring>& text) {
+void ImeHelperDialog::OnImeTextEntered(JNIEnv* env,
+ const JavaParamRef<jobject>& jobj,
+ const JavaParamRef<jstring>& text) {
std::string textInput = base::android::ConvertJavaStringToUTF8(env, text);
ime_feature_->OnImeTextEntered(textInput);
}
« no previous file with comments | « blimp/client/app/android/ime_helper_dialog.h ('k') | blimp/client/app/android/java/res/layout/blimp_main.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698