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

Unified Diff: blimp/client/app/android/web_input_box.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
« no previous file with comments | « blimp/client/app/android/web_input_box.h ('k') | build/android/lint/suppressions.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/app/android/web_input_box.cc
diff --git a/blimp/client/app/android/web_input_box.cc b/blimp/client/app/android/web_input_box.cc
deleted file mode 100644
index 444cc5b4b224d887ed5a866b055f4f80bb312281..0000000000000000000000000000000000000000
--- a/blimp/client/app/android/web_input_box.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// 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 "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 "ui/base/ime/text_input_type.h"
-
-using base::android::JavaParamRef;
-
-namespace blimp {
-namespace client {
-
-static jlong Init(JNIEnv* env,
- const JavaParamRef<jobject>& jobj,
- const JavaParamRef<jobject>& blimp_client_session) {
- BlimpClientSession* client_session =
- BlimpClientSessionAndroid::FromJavaObject(env,
- blimp_client_session.obj());
- return reinterpret_cast<intptr_t>(
- new WebInputBox(env, jobj, client_session->GetImeFeature()));
-}
-
-// static
-bool WebInputBox::RegisterJni(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-WebInputBox::WebInputBox(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() {
- ime_feature_->set_delegate(nullptr);
-}
-
-void WebInputBox::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
- delete this;
-}
-
-void WebInputBox::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(
- env, java_obj_, input_type,
- base::android::ConvertUTF8ToJavaString(env, text));
-}
-
-void WebInputBox::OnHideImeRequested() {
- JNIEnv* env = base::android::AttachCurrentThread();
- Java_WebInputBox_onHideImeRequested(env, java_obj_);
-}
-
-void WebInputBox::OnImeTextEntered(JNIEnv* env,
- const JavaParamRef<jobject>& jobj,
- const JavaParamRef<jstring>& text) {
- std::string textInput = base::android::ConvertJavaStringToUTF8(env, text);
- ime_feature_->OnImeTextEntered(textInput);
-}
-
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/app/android/web_input_box.h ('k') | build/android/lint/suppressions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698