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 <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/i18n/char_iterator.h" | 14 #include "base/i18n/char_iterator.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
19 #include "base/third_party/icu/icu_utf.h" | 19 #include "base/third_party/icu/icu_utf.h" |
20 #include "chromeos/ime/composition_text.h" | 20 #include "ui/base/ime/chromeos/composition_text.h" |
21 #include "chromeos/ime/ime_keyboard.h" | 21 #include "ui/base/ime/chromeos/ime_keyboard.h" |
22 #include "chromeos/ime/input_method_manager.h" | 22 #include "ui/base/ime/chromeos/input_method_manager.h" |
23 #include "ui/base/ime/text_input_client.h" | 23 #include "ui/base/ime/text_input_client.h" |
24 #include "ui/events/event.h" | 24 #include "ui/events/event.h" |
25 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 chromeos::IMEEngineHandlerInterface* GetEngine() { | 28 chromeos::IMEEngineHandlerInterface* GetEngine() { |
29 return chromeos::IMEBridge::Get()->GetCurrentEngineHandler(); | 29 return chromeos::IMEBridge::Get()->GetCurrentEngineHandler(); |
30 } | 30 } |
31 } // namespace | 31 } // namespace |
32 | 32 |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() { | 665 bool InputMethodChromeOS::IsNonPasswordInputFieldFocused() { |
666 TextInputType type = GetTextInputType(); | 666 TextInputType type = GetTextInputType(); |
667 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); | 667 return (type != TEXT_INPUT_TYPE_NONE) && (type != TEXT_INPUT_TYPE_PASSWORD); |
668 } | 668 } |
669 | 669 |
670 bool InputMethodChromeOS::IsInputFieldFocused() { | 670 bool InputMethodChromeOS::IsInputFieldFocused() { |
671 return GetTextInputType() != TEXT_INPUT_TYPE_NONE; | 671 return GetTextInputType() != TEXT_INPUT_TYPE_NONE; |
672 } | 672 } |
673 | 673 |
674 } // namespace ui | 674 } // namespace ui |
OLD | NEW |