Chromium Code Reviews| Index: blimp/client/core/contents/android/ime_helper_dialog.h |
| diff --git a/blimp/client/core/contents/android/ime_helper_dialog.h b/blimp/client/core/contents/android/ime_helper_dialog.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..970a4ccf9bd85b13eea20361f490c63bd6a50009 |
| --- /dev/null |
| +++ b/blimp/client/core/contents/android/ime_helper_dialog.h |
| @@ -0,0 +1,53 @@ |
| +// 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. |
| + |
| +#ifndef BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ |
| +#define BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/android/jni_android.h" |
| +#include "base/macros.h" |
| +#include "blimp/client/core/contents/ime_feature.h" |
| +#include "ui/base/ime/text_input_type.h" |
| + |
| +namespace ui { |
| +class WindowAndroid; |
| +} |
|
David Trainor- moved to gerrit
2016/08/31 05:59:09
// namespace ui
shaktisahu
2016/08/31 17:28:21
Done.
|
| + |
| +namespace blimp { |
| +namespace client { |
| + |
| +// The native component of |
| +// org.chromium.blimp.core.contents.input.ImeHelperDialog |
| +class ImeHelperDialog : public ImeFeature::Delegate { |
| + public: |
| + static bool RegisterJni(JNIEnv* env); |
| + |
| + explicit ImeHelperDialog(ui::WindowAndroid* window); |
| + ~ImeHelperDialog() override; |
| + |
| + // ImeFeature::Delegate implementation. |
| + void OnShowImeRequested(ui::TextInputType input_type, |
|
David Trainor- moved to gerrit
2016/08/31 05:59:09
We should look into grouping these params into a R
shaktisahu
2016/08/31 17:28:21
Acknowledged.
|
| + const std::string& text, |
| + const ShowImeCallback& callback) override; |
| + void OnHideImeRequested() override; |
| + |
| + // 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: |
| + base::android::ScopedJavaLocalRef<jobject> java_obj_; |
| + |
| + // A callback to be executed on text submission from the user. |
| + ShowImeCallback textSubmitCallback_; |
|
David Trainor- moved to gerrit
2016/08/31 05:59:09
text_submit_callback_
shaktisahu
2016/08/31 17:28:21
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ImeHelperDialog); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| +#endif // BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ |