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

Side by Side Diff: blimp/client/core/contents/android/ime_helper_dialog.h

Issue 2292343002: Hooking up Blimp IME with BlimpContents (Closed)
Patch Set: Addressed initial comments Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_
6 #define BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_
7
8 #include <string>
9
10 #include "base/android/jni_android.h"
11 #include "base/macros.h"
12 #include "blimp/client/core/contents/ime_feature.h"
13 #include "ui/base/ime/text_input_type.h"
14
15 namespace ui {
16 class WindowAndroid;
17 } // namespace ui
18
19 namespace blimp {
20 namespace client {
21
22 // The native component of
23 // org.chromium.blimp.core.contents.input.ImeHelperDialog
24 class ImeHelperDialog : public ImeFeature::Delegate {
25 public:
26 static bool RegisterJni(JNIEnv* env);
27
28 explicit ImeHelperDialog(ui::WindowAndroid* window);
29 ~ImeHelperDialog() override;
30
31 // ImeFeature::Delegate implementation.
32 void OnShowImeRequested(ui::TextInputType input_type,
33 const std::string& text,
34 const ImeFeature::ShowImeCallback& callback) override;
35 void OnHideImeRequested() override;
36
37 // Sends the text entered from IME to the blimp engine.
38 void OnImeTextEntered(JNIEnv* env,
39 const base::android::JavaParamRef<jobject>& jobj,
40 const base::android::JavaParamRef<jstring>& text);
41
42 private:
43 base::android::ScopedJavaLocalRef<jobject> java_obj_;
44
45 // A callback for the current request to be executed on text submission from
46 // the user.
47 ImeFeature::ShowImeCallback text_submit_callback_;
48
49 DISALLOW_COPY_AND_ASSIGN(ImeHelperDialog);
50 };
51
52 } // namespace client
53 } // namespace blimp
54 #endif // BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698