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/mock_input_method.h" | 5 #include "views/ime/mock_input_method.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 "ui/base/keycodes/keyboard_codes.h" | 9 #include "ui/base/keycodes/keyboard_codes.h" |
10 #include "views/events/event.h" | 10 #include "views/events/event.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 client->InsertChar(ch, key.flags()); | 73 client->InsertChar(ch, key.flags()); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 ClearResult(); | 77 ClearResult(); |
78 } | 78 } |
79 | 79 |
80 void MockInputMethod::OnTextInputTypeChanged(View* view) { | 80 void MockInputMethod::OnTextInputTypeChanged(View* view) { |
81 if (IsViewFocused(view)) | 81 if (IsViewFocused(view)) |
82 text_input_type_changed_ = true; | 82 text_input_type_changed_ = true; |
| 83 InputMethodBase::OnTextInputTypeChanged(view); |
83 } | 84 } |
84 | 85 |
85 void MockInputMethod::OnCaretBoundsChanged(View* view) { | 86 void MockInputMethod::OnCaretBoundsChanged(View* view) { |
86 if (IsViewFocused(view)) | 87 if (IsViewFocused(view)) |
87 caret_bounds_changed_ = true; | 88 caret_bounds_changed_ = true; |
88 } | 89 } |
89 | 90 |
90 void MockInputMethod::CancelComposition(View* view) { | 91 void MockInputMethod::CancelComposition(View* view) { |
91 if (IsViewFocused(view)) { | 92 if (IsViewFocused(view)) { |
92 cancel_composition_called_ = true; | 93 cancel_composition_called_ = true; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 cancel_composition_called_ = false; | 163 cancel_composition_called_ = false; |
163 } | 164 } |
164 | 165 |
165 void MockInputMethod::ClearResult() { | 166 void MockInputMethod::ClearResult() { |
166 composition_.Clear(); | 167 composition_.Clear(); |
167 composition_changed_ = false; | 168 composition_changed_ = false; |
168 result_text_.clear(); | 169 result_text_.clear(); |
169 } | 170 } |
170 | 171 |
171 } // namespace views | 172 } // namespace views |
OLD | NEW |