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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 char16 ch = key.GetCharacter(); | 60 char16 ch = key.GetCharacter(); |
61 client->InsertChar(ch, key.flags()); | 61 client->InsertChar(ch, key.flags()); |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 ClearResult(); | 65 ClearResult(); |
66 } | 66 } |
67 | 67 |
68 void MockInputMethod::OnTextInputTypeChanged(View* view) { | 68 void MockInputMethod::OnTextInputTypeChanged(View* view) { |
69 DCHECK(IsViewFocused(view)); | 69 DCHECK(IsViewFocused(view)); |
| 70 InputMethodBase::OnTextInputTypeChanged(view); |
70 text_input_type_changed_ = true; | 71 text_input_type_changed_ = true; |
71 } | 72 } |
72 | 73 |
73 void MockInputMethod::OnCaretBoundsChanged(View* view) { | 74 void MockInputMethod::OnCaretBoundsChanged(View* view) { |
74 DCHECK(IsViewFocused(view)); | 75 DCHECK(IsViewFocused(view)); |
75 caret_bounds_changed_ = true; | 76 caret_bounds_changed_ = true; |
76 } | 77 } |
77 | 78 |
78 void MockInputMethod::CancelComposition(View* view) { | 79 void MockInputMethod::CancelComposition(View* view) { |
79 DCHECK(IsViewFocused(view)); | 80 DCHECK(IsViewFocused(view)); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 cancel_composition_called_ = false; | 146 cancel_composition_called_ = false; |
146 } | 147 } |
147 | 148 |
148 void MockInputMethod::ClearResult() { | 149 void MockInputMethod::ClearResult() { |
149 composition_.Clear(); | 150 composition_.Clear(); |
150 composition_changed_ = false; | 151 composition_changed_ = false; |
151 result_text_.clear(); | 152 result_text_.clear(); |
152 } | 153 } |
153 | 154 |
154 } // namespace views | 155 } // namespace views |
OLD | NEW |