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 "chrome/browser/chromeos/input_method/input_method_engine.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
6 | 6 |
7 #undef FocusIn | 7 #undef FocusIn |
8 #undef FocusOut | 8 #undef FocusOut |
9 #undef RootWindow | 9 #undef RootWindow |
10 #include <map> | 10 #include <map> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 if (key_char.size() == 1) | 317 if (key_char.size() == 1) |
318 ch = key_char[0]; | 318 ch = key_char[0]; |
319 } | 319 } |
320 ui::KeyEvent ui_event( | 320 ui::KeyEvent ui_event( |
321 type, key_code, | 321 type, key_code, |
322 ui::KeycodeConverter::CodeStringToDomCode(event.code.c_str()), flags, | 322 ui::KeycodeConverter::CodeStringToDomCode(event.code.c_str()), flags, |
323 ui::KeycodeConverter::KeyStringToDomKey(event.key.c_str()), ch, | 323 ui::KeycodeConverter::KeyStringToDomKey(event.key.c_str()), ch, |
324 ui::EventTimeForNow()); | 324 ui::EventTimeForNow()); |
325 base::AutoReset<const ui::KeyEvent*> reset_sent_key(&sent_key_event_, | 325 base::AutoReset<const ui::KeyEvent*> reset_sent_key(&sent_key_event_, |
326 &ui_event); | 326 &ui_event); |
327 input_method->DispatchKeyEvent(ui_event); | 327 input_method->DispatchKeyEvent(&ui_event); |
328 } | 328 } |
329 | 329 |
330 return true; | 330 return true; |
331 } | 331 } |
332 | 332 |
333 const InputMethodEngine::CandidateWindowProperty& | 333 const InputMethodEngine::CandidateWindowProperty& |
334 InputMethodEngine::GetCandidateWindowProperty() const { | 334 InputMethodEngine::GetCandidateWindowProperty() const { |
335 return candidate_window_property_; | 335 return candidate_window_property_; |
336 } | 336 } |
337 | 337 |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 // TODO(nona): Implement it. | 708 // TODO(nona): Implement it. |
709 break; | 709 break; |
710 } | 710 } |
711 } | 711 } |
712 } | 712 } |
713 | 713 |
714 // TODO(nona): Support item.children. | 714 // TODO(nona): Support item.children. |
715 } | 715 } |
716 | 716 |
717 } // namespace chromeos | 717 } // namespace chromeos |
OLD | NEW |