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

Side by Side Diff: ui/base/ime/input_method_android.cc

Issue 1394883004: Introduce InputMethodAuraAndroid for 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 unified diff | Download patch
« no previous file with comments | « ui/base/ime/input_method_android.h ('k') | ui/base/ime/input_method_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 #include "ui/base/ime/input_method_android.h"
6
7 #include "ui/base/ime/text_input_client.h"
8 #include "ui/events/event.h"
9
10 // TODO(bshe): This is currently very similar to InputMethodMUS. Consider unify
11 // them in the furture if the two have reasonable similarity.
12
13 namespace ui {
14
15 ////////////////////////////////////////////////////////////////////////////////
16 // InputMethodAndroid, public:
17
18 InputMethodAndroid::InputMethodAndroid(
19 internal::InputMethodDelegate* delegate) {
20 SetDelegate(delegate);
21 }
22
23 InputMethodAndroid::~InputMethodAndroid() {}
24
25 bool InputMethodAndroid::OnUntranslatedIMEMessage(
26 const base::NativeEvent& event,
27 NativeEventResult* result) {
28 return false;
29 }
30
31 void InputMethodAndroid::DispatchKeyEvent(ui::KeyEvent* event) {
32 DCHECK(event->type() == ui::ET_KEY_PRESSED ||
33 event->type() == ui::ET_KEY_RELEASED);
34
35 // If no text input client, do nothing.
36 if (!GetTextInputClient()) {
37 ignore_result(DispatchKeyEventPostIME(event));
38 return;
39 }
40
41 ignore_result(DispatchKeyEventPostIME(event));
42 }
43
44 void InputMethodAndroid::OnCaretBoundsChanged(
45 const ui::TextInputClient* client) {
46 }
47
48 void InputMethodAndroid::CancelComposition(
49 const ui::TextInputClient* client) {
50 }
51
52 void InputMethodAndroid::OnInputLocaleChanged() {}
53
54 std::string InputMethodAndroid::GetInputLocale() {
55 return "";
56 }
57
58 bool InputMethodAndroid::IsCandidatePopupOpen() const {
59 return false;
60 }
61
62 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_android.h ('k') | ui/base/ime/input_method_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698