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 #ifndef UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/base/ime/input_method_base.h" | 9 #include "ui/base/ime/input_method_base.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 // A minimal implementation of ui::InputMethod, which supports only the direct | 13 // A minimal implementation of ui::InputMethod, which supports only the direct |
14 // input without any compositions or conversions. | 14 // input without any compositions or conversions. |
15 class UI_BASE_IME_EXPORT InputMethodMinimal : public InputMethodBase { | 15 class UI_BASE_IME_EXPORT InputMethodMinimal : public InputMethodBase { |
16 public: | 16 public: |
17 explicit InputMethodMinimal(internal::InputMethodDelegate* delegate); | 17 explicit InputMethodMinimal(internal::InputMethodDelegate* delegate); |
18 ~InputMethodMinimal() override; | 18 ~InputMethodMinimal() override; |
19 | 19 |
20 // Overriden from InputMethod. | 20 // Overriden from InputMethod. |
21 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, | 21 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
22 NativeEventResult* result) override; | 22 NativeEventResult* result) override; |
23 void DispatchKeyEvent(ui::KeyEvent* event) override; | 23 void DispatchKeyEvent(ui::KeyEvent* event) override; |
24 void OnCaretBoundsChanged(const TextInputClient* client) override; | 24 void OnCaretBoundsChanged(const TextInputClient* client) override; |
25 void CancelComposition(const TextInputClient* client) override; | 25 void CancelComposition(const TextInputClient* client) override; |
26 void OnInputLocaleChanged() override; | |
27 std::string GetInputLocale() override; | |
28 bool IsCandidatePopupOpen() const override; | 26 bool IsCandidatePopupOpen() const override; |
29 | 27 |
30 private: | 28 private: |
31 DISALLOW_COPY_AND_ASSIGN(InputMethodMinimal); | 29 DISALLOW_COPY_AND_ASSIGN(InputMethodMinimal); |
32 }; | 30 }; |
33 | 31 |
34 } // namespace ui | 32 } // namespace ui |
35 | 33 |
36 #endif // UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ | 34 #endif // UI_BASE_IME_INPUT_METHOD_MINIMAL_H_ |
OLD | NEW |