OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/base/ime/input_method_base.h" | 5 #include "ui/base/ime/input_method_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 TextInputClient* InputMethodBase::GetTextInputClient() const { | 58 TextInputClient* InputMethodBase::GetTextInputClient() const { |
59 return text_input_client_; | 59 return text_input_client_; |
60 } | 60 } |
61 | 61 |
62 void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) { | 62 void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) { |
63 if (!IsTextInputClientFocused(client)) | 63 if (!IsTextInputClientFocused(client)) |
64 return; | 64 return; |
65 NotifyTextInputStateChanged(client); | 65 NotifyTextInputStateChanged(client); |
66 } | 66 } |
67 | 67 |
| 68 void InputMethodBase::OnInputLocaleChanged() { |
| 69 } |
| 70 |
| 71 bool InputMethodBase::IsInputLocaleCJK() const { |
| 72 return false; |
| 73 } |
| 74 |
68 TextInputType InputMethodBase::GetTextInputType() const { | 75 TextInputType InputMethodBase::GetTextInputType() const { |
69 TextInputClient* client = GetTextInputClient(); | 76 TextInputClient* client = GetTextInputClient(); |
70 return client ? client->GetTextInputType() : TEXT_INPUT_TYPE_NONE; | 77 return client ? client->GetTextInputType() : TEXT_INPUT_TYPE_NONE; |
71 } | 78 } |
72 | 79 |
73 TextInputMode InputMethodBase::GetTextInputMode() const { | 80 TextInputMode InputMethodBase::GetTextInputMode() const { |
74 TextInputClient* client = GetTextInputClient(); | 81 TextInputClient* client = GetTextInputClient(); |
75 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT; | 82 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT; |
76 } | 83 } |
77 | 84 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 InputMethod* InputMethodBase::GetInputMethod() { | 217 InputMethod* InputMethodBase::GetInputMethod() { |
211 return this; | 218 return this; |
212 } | 219 } |
213 | 220 |
214 const std::vector<std::unique_ptr<ui::KeyEvent>>& | 221 const std::vector<std::unique_ptr<ui::KeyEvent>>& |
215 InputMethodBase::GetKeyEventsForTesting() { | 222 InputMethodBase::GetKeyEventsForTesting() { |
216 return key_events_for_testing_; | 223 return key_events_for_testing_; |
217 } | 224 } |
218 | 225 |
219 } // namespace ui | 226 } // namespace ui |
OLD | NEW |