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 "ui/views/ime/mock_input_method.h" | 5 #include "ui/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/ime/text_input_client.h" | 9 #include "ui/base/ime/text_input_client.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 ClearStates(); | 152 ClearStates(); |
153 ClearResult(); | 153 ClearResult(); |
154 } | 154 } |
155 | 155 |
156 void MockInputMethod::SetCompositionTextForNextKey( | 156 void MockInputMethod::SetCompositionTextForNextKey( |
157 const ui::CompositionText& composition) { | 157 const ui::CompositionText& composition) { |
158 composition_changed_ = true; | 158 composition_changed_ = true; |
159 composition_ = composition; | 159 composition_ = composition; |
160 } | 160 } |
161 | 161 |
162 void MockInputMethod::SetResultTextForNextKey(const string16& result) { | 162 void MockInputMethod::SetResultTextForNextKey(const base::string16& result) { |
163 result_text_ = result; | 163 result_text_ = result; |
164 } | 164 } |
165 | 165 |
166 void MockInputMethod::SetInputLocale(const std::string& locale) { | 166 void MockInputMethod::SetInputLocale(const std::string& locale) { |
167 if (locale_ != locale) { | 167 if (locale_ != locale) { |
168 locale_ = locale; | 168 locale_ = locale; |
169 OnInputMethodChanged(); | 169 OnInputMethodChanged(); |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
(...skipping 21 matching lines...) Expand all Loading... |
194 input_locale_changed_ = false; | 194 input_locale_changed_ = false; |
195 } | 195 } |
196 | 196 |
197 void MockInputMethod::ClearResult() { | 197 void MockInputMethod::ClearResult() { |
198 composition_.Clear(); | 198 composition_.Clear(); |
199 composition_changed_ = false; | 199 composition_changed_ = false; |
200 result_text_.clear(); | 200 result_text_.clear(); |
201 } | 201 } |
202 | 202 |
203 } // namespace views | 203 } // namespace views |
OLD | NEW |