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 #include "views/ime/input_method_win.h" | 5 #include "views/ime/input_method_win.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 DispatchKeyEventPostIME(key); | 67 DispatchKeyEventPostIME(key); |
68 } | 68 } |
69 | 69 |
70 void InputMethodWin::OnTextInputTypeChanged(View* view) { | 70 void InputMethodWin::OnTextInputTypeChanged(View* view) { |
71 if (IsViewFocused(view)) { | 71 if (IsViewFocused(view)) { |
72 ime_input_.CancelIME(hwnd()); | 72 ime_input_.CancelIME(hwnd()); |
73 UpdateIMEState(); | 73 UpdateIMEState(); |
74 } | 74 } |
| 75 InputMethodBase::OnTextInputTypeChanged(view); |
75 } | 76 } |
76 | 77 |
77 void InputMethodWin::OnCaretBoundsChanged(View* view) { | 78 void InputMethodWin::OnCaretBoundsChanged(View* view) { |
78 gfx::Rect rect; | 79 gfx::Rect rect; |
79 if (!IsViewFocused(view) || !GetCaretBoundsInWidget(&rect)) | 80 if (!IsViewFocused(view) || !GetCaretBoundsInWidget(&rect)) |
80 return; | 81 return; |
81 ime_input_.UpdateCaretRect(hwnd(), rect); | 82 ime_input_.UpdateCaretRect(hwnd(), rect); |
82 } | 83 } |
83 | 84 |
84 void InputMethodWin::CancelComposition(View* view) { | 85 void InputMethodWin::CancelComposition(View* view) { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 case ui::TEXT_INPUT_TYPE_PASSWORD: | 242 case ui::TEXT_INPUT_TYPE_PASSWORD: |
242 ime_input_.DisableIME(hwnd()); | 243 ime_input_.DisableIME(hwnd()); |
243 break; | 244 break; |
244 default: | 245 default: |
245 ime_input_.EnableIME(hwnd()); | 246 ime_input_.EnableIME(hwnd()); |
246 break; | 247 break; |
247 } | 248 } |
248 } | 249 } |
249 | 250 |
250 } // namespace views | 251 } // namespace views |
OLD | NEW |