OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_linux_x11.h" | 5 #include "ui/base/ime/input_method_linux_x11.h" |
6 | 6 |
7 #include "ui/base/ime/linux/linux_input_method_context_factory.h" | 7 #include "ui/base/ime/linux/linux_input_method_context_factory.h" |
8 #include "ui/base/ime/text_input_client.h" | 8 #include "ui/base/ime/text_input_client.h" |
9 #include "ui/events/event.h" | 9 #include "ui/events/event.h" |
10 #include "ui/events/event_utils.h" | 10 #include "ui/events/event_utils.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 void InputMethodLinuxX11::CancelComposition(const TextInputClient* client) { | 98 void InputMethodLinuxX11::CancelComposition(const TextInputClient* client) { |
99 if (!IsTextInputClientFocused(client)) | 99 if (!IsTextInputClientFocused(client)) |
100 return; | 100 return; |
101 | 101 |
102 input_method_context_->Reset(); | 102 input_method_context_->Reset(); |
103 input_method_context_->OnTextInputTypeChanged(client->GetTextInputType()); | 103 input_method_context_->OnTextInputTypeChanged(client->GetTextInputType()); |
104 } | 104 } |
105 | 105 |
106 void InputMethodLinuxX11::OnInputLocaleChanged() { | 106 void InputMethodLinuxX11::OnInputLocaleChanged() { |
107 InputMethodBase::OnInputLocaleChanged(); | |
108 } | 107 } |
109 | 108 |
110 std::string InputMethodLinuxX11::GetInputLocale() { | 109 std::string InputMethodLinuxX11::GetInputLocale() { |
111 return ""; | 110 return ""; |
112 } | 111 } |
113 | 112 |
114 base::i18n::TextDirection InputMethodLinuxX11::GetInputTextDirection() { | 113 base::i18n::TextDirection InputMethodLinuxX11::GetInputTextDirection() { |
115 return input_method_context_->GetInputTextDirection(); | 114 return input_method_context_->GetInputTextDirection(); |
116 } | 115 } |
117 | 116 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if (ch) { | 174 if (ch) { |
176 GetTextInputClient()->InsertChar(ch, event.flags()); | 175 GetTextInputClient()->InsertChar(ch, event.flags()); |
177 return true; | 176 return true; |
178 } | 177 } |
179 } | 178 } |
180 | 179 |
181 return false; | 180 return false; |
182 } | 181 } |
183 | 182 |
184 } // namespace ui | 183 } // namespace ui |
OLD | NEW |