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

Unified Diff: blimp/client/core/contents/android/ime_helper_dialog.cc

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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/core/contents/android/ime_helper_dialog.cc
diff --git a/blimp/client/core/contents/android/ime_helper_dialog.cc b/blimp/client/core/contents/android/ime_helper_dialog.cc
deleted file mode 100644
index d5dd83f39390af463136b49582297dcd5c91462b..0000000000000000000000000000000000000000
--- a/blimp/client/core/contents/android/ime_helper_dialog.cc
+++ /dev/null
@@ -1,62 +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/core/contents/android/ime_helper_dialog.h"
-
-#include "base/android/jni_string.h"
-#include "base/callback_helpers.h"
-#include "jni/ImeHelperDialog_jni.h"
-#include "ui/android/window_android.h"
-
-namespace blimp {
-namespace client {
-
-// static
-bool ImeHelperDialog::RegisterJni(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-ImeHelperDialog::ImeHelperDialog(ui::WindowAndroid* window) {
- JNIEnv* env = base::android::AttachCurrentThread();
- java_obj_.Reset(Java_ImeHelperDialog_create(
- env, reinterpret_cast<intptr_t>(this), window->GetJavaObject()));
-}
-
-ImeHelperDialog::~ImeHelperDialog() {
- Java_ImeHelperDialog_clearNativePtr(base::android::AttachCurrentThread(),
- java_obj_);
-}
-
-void ImeHelperDialog::OnShowImeRequested(
- const ImeFeature::WebInputRequest& request) {
- current_request_ = request;
-
- JNIEnv* env = base::android::AttachCurrentThread();
- DCHECK_NE(ui::TEXT_INPUT_TYPE_NONE, current_request_.input_type);
- Java_ImeHelperDialog_onShowImeRequested(
- env, java_obj_, current_request_.input_type,
- base::android::ConvertUTF8ToJavaString(env, current_request_.text));
-}
-
-void ImeHelperDialog::OnHideImeRequested() {
- JNIEnv* env = base::android::AttachCurrentThread();
- Java_ImeHelperDialog_onHideImeRequested(env, java_obj_);
-}
-
-void ImeHelperDialog::OnImeTextEntered(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jobj,
- const base::android::JavaParamRef<jstring>& text,
- jboolean submit) {
- std::string text_input = base::android::ConvertJavaStringToUTF8(env, text);
-
- ImeFeature::WebInputResponse response;
- response.text = text_input;
- response.submit = submit;
-
- base::ResetAndReturn(&current_request_.show_ime_callback).Run(response);
-}
-
-} // namespace client
-} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698