OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_chromeos.h" | 5 #include "ui/base/ime/input_method_chromeos.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cstring> | 10 #include <cstring> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 selection_range.start() - text_range.start(), | 224 selection_range.start() - text_range.start(), |
225 selection_range.end() - text_range.start(), | 225 selection_range.end() - text_range.start(), |
226 text_range.start()); | 226 text_range.start()); |
227 } | 227 } |
228 | 228 |
229 void InputMethodChromeOS::CancelComposition(const TextInputClient* client) { | 229 void InputMethodChromeOS::CancelComposition(const TextInputClient* client) { |
230 if (IsNonPasswordInputFieldFocused() && IsTextInputClientFocused(client)) | 230 if (IsNonPasswordInputFieldFocused() && IsTextInputClientFocused(client)) |
231 ResetContext(); | 231 ResetContext(); |
232 } | 232 } |
233 | 233 |
234 void InputMethodChromeOS::OnInputLocaleChanged() { | |
235 // Not supported. | |
236 } | |
237 | |
238 std::string InputMethodChromeOS::GetInputLocale() { | |
239 // Not supported. | |
240 return ""; | |
241 } | |
242 | |
243 bool InputMethodChromeOS::IsCandidatePopupOpen() const { | 234 bool InputMethodChromeOS::IsCandidatePopupOpen() const { |
244 // TODO(yukishiino): Implement this method. | 235 // TODO(yukishiino): Implement this method. |
245 return false; | 236 return false; |
246 } | 237 } |
247 | 238 |
248 void InputMethodChromeOS::OnWillChangeFocusedClient( | 239 void InputMethodChromeOS::OnWillChangeFocusedClient( |
249 TextInputClient* focused_before, | 240 TextInputClient* focused_before, |
250 TextInputClient* focused) { | 241 TextInputClient* focused) { |
251 ConfirmCompositionText(); | 242 ConfirmCompositionText(); |
252 | 243 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() { | 633 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() { |
643 TextInputType type = GetTextInputType(); | 634 TextInputType type = GetTextInputType(); |
644 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); | 635 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); |
645 } | 636 } |
646 | 637 |
647 bool InputMethodChromeOS::IsInputFieldFocused() { | 638 bool InputMethodChromeOS::IsInputFieldFocused() { |
648 return GetTextInputType() != TEXT_INPUT_TYPE_NONE; | 639 return GetTextInputType() != TEXT_INPUT_TYPE_NONE; |
649 } | 640 } |
650 | 641 |
651 } // namespace ui | 642 } // namespace ui |
OLD | NEW |