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

Unified Diff: ui/platform_window/android/platform_ime_controller_android.h

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: ui/platform_window/android/platform_ime_controller_android.h
diff --git a/ui/platform_window/android/platform_ime_controller_android.h b/ui/platform_window/android/platform_ime_controller_android.h
index c06081ecfb9d144bae0a1ae28f0af4e88e8e9787..944d26f3f8754467bd2e62130be247d4c4dc60fc 100644
--- a/ui/platform_window/android/platform_ime_controller_android.h
+++ b/ui/platform_window/android/platform_ime_controller_android.h
@@ -7,11 +7,14 @@
#include "base/android/jni_weak_ref.h"
#include "base/macros.h"
+#include "ui/base/ime/input_method_observer.h"
#include "ui/platform_window/platform_ime_controller.h"
namespace ui {
+class InputMethod;
-class PlatformImeControllerAndroid : public PlatformImeController {
+class PlatformImeControllerAndroid : public PlatformImeController,
+ public InputMethodObserver {
public:
static bool Register(JNIEnv* env);
@@ -21,13 +24,28 @@ class PlatformImeControllerAndroid : public PlatformImeController {
// Native methods called by Java code.
void Init(JNIEnv* env, jobject jobj);
+ void SetInputMethod(InputMethod* input_method);
+ InputMethod* GetInputMethod() { return input_method_; }
+
private:
// Overridden from PlatformImeController:
void UpdateTextInputState(const TextInputState& state) override;
void SetImeVisibility(bool visible) override;
+ // InputMethodObserver:
+ void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
+ void OnFocus() override {}
+ void OnBlur() override {}
+ void OnCaretBoundsChanged(const ui::TextInputClient* client) override {}
+ void OnTextInputStateChanged(const ui::TextInputClient* client) override;
+ void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
+ void OnShowImeIfNeeded() override;
+
JavaObjectWeakGlobalRef java_platform_ime_controller_android_;
+ bool keyboard_visible_;
+ InputMethod* input_method_;
+
DISALLOW_COPY_AND_ASSIGN(PlatformImeControllerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698