OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/base/ime/remote_input_method_win.h" | 5 #include "ui/base/ime/remote_input_method_win.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/win/metro.h" | 10 #include "base/win/metro.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 if (!text_input_client_) | 192 if (!text_input_client_) |
193 return false; | 193 return false; |
194 text_input_client_->InsertChar( | 194 text_input_client_->InsertChar( |
195 static_cast<base::char16>(native_key_event.wParam), | 195 static_cast<base::char16>(native_key_event.wParam), |
196 ui::GetModifiersFromKeyState()); | 196 ui::GetModifiersFromKeyState()); |
197 return true; | 197 return true; |
198 } | 198 } |
199 | 199 |
200 if (event.is_char()) { | 200 if (event.is_char()) { |
201 if (text_input_client_) { | 201 if (text_input_client_) { |
202 text_input_client_->InsertChar(event.key_code(), | 202 text_input_client_->InsertChar( |
203 ui::GetModifiersFromKeyState()); | 203 static_cast<base::char16>(event.key_code()), |
| 204 ui::GetModifiersFromKeyState()); |
204 } | 205 } |
205 return true; | 206 return true; |
206 } | 207 } |
207 if (!delegate_) | 208 if (!delegate_) |
208 return false; | 209 return false; |
209 return delegate_->DispatchKeyEventPostIME(event); | 210 return delegate_->DispatchKeyEventPostIME(event); |
210 } | 211 } |
211 | 212 |
212 virtual void OnTextInputTypeChanged(const TextInputClient* client) override { | 213 virtual void OnTextInputTypeChanged(const TextInputClient* client) override { |
213 if (!text_input_client_ || text_input_client_ != client) | 214 if (!text_input_client_ || text_input_client_ != client) |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate)); | 390 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate)); |
390 } | 391 } |
391 | 392 |
392 // static | 393 // static |
393 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( | 394 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( |
394 InputMethod* input_method) { | 395 InputMethod* input_method) { |
395 return GetPrivate(input_method); | 396 return GetPrivate(input_method); |
396 } | 397 } |
397 | 398 |
398 } // namespace ui | 399 } // namespace ui |
OLD | NEW |