OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WIN_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_WIN_H_ |
6 #define UI_BASE_IME_INPUT_METHOD_WIN_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "ui/base/ime/input_method_base.h" | 14 #include "ui/base/ime/input_method_base.h" |
15 #include "ui/base/ime/win/imm32_manager.h" | 15 #include "ui/base/ime/win/imm32_manager.h" |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 // A common InputMethod implementation based on IMM32. | 19 // A common InputMethod implementation based on IMM32. |
20 class UI_BASE_IME_EXPORT InputMethodWin : public InputMethodBase { | 20 class UI_BASE_IME_EXPORT InputMethodWin : public InputMethodBase { |
21 public: | 21 public: |
22 InputMethodWin(internal::InputMethodDelegate* delegate, | 22 InputMethodWin(internal::InputMethodDelegate* delegate, |
23 HWND toplevel_window_handle); | 23 HWND toplevel_window_handle); |
| 24 ~InputMethodWin(); |
24 | 25 |
25 // Overridden from InputMethod: | 26 // Overridden from InputMethod: |
26 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, | 27 bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
27 NativeEventResult* result) override; | 28 NativeEventResult* result) override; |
28 void DispatchKeyEvent(ui::KeyEvent* event) override; | 29 void DispatchKeyEvent(ui::KeyEvent* event) override; |
29 void OnTextInputTypeChanged(const TextInputClient* client) override; | 30 void OnTextInputTypeChanged(const TextInputClient* client) override; |
30 void OnCaretBoundsChanged(const TextInputClient* client) override; | 31 void OnCaretBoundsChanged(const TextInputClient* client) override; |
31 void CancelComposition(const TextInputClient* client) override; | 32 void CancelComposition(const TextInputClient* client) override; |
32 void OnInputLocaleChanged() override; | 33 void OnInputLocaleChanged() override; |
33 std::string GetInputLocale() override; | 34 std::string GetInputLocale() override; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 136 |
136 // Used for making callbacks. | 137 // Used for making callbacks. |
137 base::WeakPtrFactory<InputMethodWin> weak_ptr_factory_; | 138 base::WeakPtrFactory<InputMethodWin> weak_ptr_factory_; |
138 | 139 |
139 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); | 140 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); |
140 }; | 141 }; |
141 | 142 |
142 } // namespace ui | 143 } // namespace ui |
143 | 144 |
144 #endif // UI_BASE_IME_INPUT_METHOD_WIN_H_ | 145 #endif // UI_BASE_IME_INPUT_METHOD_WIN_H_ |
OLD | NEW |