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

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

Issue 2292343002: Hooking up Blimp IME with BlimpContents (Closed)
Patch Set: Fixed linux client 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/core/contents/android/ime_helper_dialog.h
diff --git a/blimp/client/app/android/ime_helper_dialog.h b/blimp/client/core/contents/android/ime_helper_dialog.h
similarity index 52%
rename from blimp/client/app/android/ime_helper_dialog.h
rename to blimp/client/core/contents/android/ime_helper_dialog.h
index ce419b928d782b954c350008abc7e5c0e201a16f..497c65b3c6b1a796f8f15c581680d864f309ed68 100644
--- a/blimp/client/app/android/ime_helper_dialog.h
+++ b/blimp/client/core/contents/android/ime_helper_dialog.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_CLIENT_APP_ANDROID_IME_HELPER_DIALOG_H_
-#define BLIMP_CLIENT_APP_ANDROID_IME_HELPER_DIALOG_H_
+#ifndef BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_
+#define BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_
#include <string>
@@ -12,48 +12,43 @@
#include "blimp/client/core/contents/ime_feature.h"
#include "ui/base/ime/text_input_type.h"
+namespace ui {
+class WindowAndroid;
+} // namespace ui
+
namespace blimp {
namespace client {
-// The native component of org.chromium.blimp.input.ImeHelperDialog.
+// The native component of
+// org.chromium.blimp.core.contents.input.ImeHelperDialog
class ImeHelperDialog : public ImeFeature::Delegate {
public:
static bool RegisterJni(JNIEnv* env);
- // |ime_feature| is expected to outlive the ImeHelperDialog.
- ImeHelperDialog(JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jobj,
- ImeFeature* ime_feature);
+ explicit ImeHelperDialog(ui::WindowAndroid* window);
+ ~ImeHelperDialog() override;
- // Brings up IME for user to enter text.
+ // ImeFeature::Delegate implementation.
void OnShowImeRequested(ui::TextInputType input_type,
- const std::string& text) override;
-
- // Hides IME.
+ const std::string& text,
+ const ImeFeature::ShowImeCallback& callback) override;
void OnHideImeRequested() override;
- // Methods called from Java via JNI.
- void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
-
// Sends the text entered from IME to the blimp engine.
void OnImeTextEntered(JNIEnv* env,
const base::android::JavaParamRef<jobject>& jobj,
const base::android::JavaParamRef<jstring>& text);
private:
- ~ImeHelperDialog() override;
-
- // Reference to the Java object which owns this class.
base::android::ScopedJavaGlobalRef<jobject> java_obj_;
- // A bridge to the network layer which does the work of (de)serializing the
- // outgoing and incoming BlimpMessage::IME messages from the engine.
- ImeFeature* ime_feature_;
+ // A callback for the current request to be executed on text submission from
+ // the user.
+ ImeFeature::ShowImeCallback text_submit_callback_;
DISALLOW_COPY_AND_ASSIGN(ImeHelperDialog);
};
} // namespace client
} // namespace blimp
-
-#endif // BLIMP_CLIENT_APP_ANDROID_IME_HELPER_DIALOG_H_
+#endif // BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_

Powered by Google App Engine
This is Rietveld 408576698