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/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.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 shared between IMM32 and TSF. | 19 // A common InputMethod implementation shared between IMM32 and TSF. |
20 class UI_EXPORT InputMethodWin : public InputMethodBase { | 20 class UI_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 | 24 |
25 // Overridden from InputMethod: | 25 // Overridden from InputMethod: |
26 virtual void Init(bool focused) OVERRIDE; | 26 virtual void Init(bool focused) OVERRIDE; |
27 virtual bool DispatchKeyEvent( | 27 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE; |
28 const base::NativeEvent& native_key_event) OVERRIDE; | |
29 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event) OVERRIDE; | 28 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event) OVERRIDE; |
30 virtual void OnInputLocaleChanged() OVERRIDE; | 29 virtual void OnInputLocaleChanged() OVERRIDE; |
31 virtual std::string GetInputLocale() OVERRIDE; | 30 virtual std::string GetInputLocale() OVERRIDE; |
32 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; | 31 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; |
33 virtual bool IsActive() OVERRIDE; | 32 virtual bool IsActive() OVERRIDE; |
34 | 33 |
35 protected: | 34 protected: |
36 // Some IMEs rely on WM_IME_REQUEST message even when TSF is enabled. So | 35 // Some IMEs rely on WM_IME_REQUEST message even when TSF is enabled. So |
37 // OnImeRequest (and its actual implementations as OnDocumentFeed, | 36 // OnImeRequest (and its actual implementations as OnDocumentFeed, |
38 // OnReconvertString, and OnQueryCharPosition) are placed in this base class. | 37 // OnReconvertString, and OnQueryCharPosition) are placed in this base class. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // pressing ctrl-shift. It'll be sent to the text input client when the key | 84 // pressing ctrl-shift. It'll be sent to the text input client when the key |
86 // is released. | 85 // is released. |
87 base::i18n::TextDirection pending_requested_direction_; | 86 base::i18n::TextDirection pending_requested_direction_; |
88 | 87 |
89 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); | 88 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); |
90 }; | 89 }; |
91 | 90 |
92 } // namespace ui | 91 } // namespace ui |
93 | 92 |
94 #endif // UI_BASE_IME_INPUT_METHOD_WIN_H_ | 93 #endif // UI_BASE_IME_INPUT_METHOD_WIN_H_ |
OLD | NEW |