| 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 #define XK_MISCELLANY | 7 #define XK_MISCELLANY |
| 8 #include <X11/keysymdef.h> | 8 #include <X11/keysymdef.h> |
| 9 #include <X11/X.h> | 9 #include <X11/X.h> |
| 10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 const ui::KeyboardCode key_code = ui::KeyboardCodeFromXKeysym(xkeysym); | 229 const ui::KeyboardCode key_code = ui::KeyboardCodeFromXKeysym(xkeysym); |
| 230 | 230 |
| 231 const std::string code = event.code; | 231 const std::string code = event.code; |
| 232 int flags = ui::EF_NONE; | 232 int flags = ui::EF_NONE; |
| 233 flags |= event.alt_key ? ui::EF_ALT_DOWN : ui::EF_NONE; | 233 flags |= event.alt_key ? ui::EF_ALT_DOWN : ui::EF_NONE; |
| 234 flags |= event.ctrl_key ? ui::EF_CONTROL_DOWN : ui::EF_NONE; | 234 flags |= event.ctrl_key ? ui::EF_CONTROL_DOWN : ui::EF_NONE; |
| 235 flags |= event.shift_key ? ui::EF_SHIFT_DOWN : ui::EF_NONE; | 235 flags |= event.shift_key ? ui::EF_SHIFT_DOWN : ui::EF_NONE; |
| 236 flags |= event.caps_lock ? ui::EF_CAPS_LOCK_DOWN : ui::EF_NONE; | 236 flags |= event.caps_lock ? ui::EF_CAPS_LOCK_DOWN : ui::EF_NONE; |
| 237 | 237 |
| 238 ui::KeyEvent ui_event(type, key_code, code, flags, false /* is_char */); | 238 ui::KeyEvent ui_event(type, key_code, code, flags, false /* is_char */); |
| 239 dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&ui_event); | 239 dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&ui_event); |
| 240 } | 240 } |
| 241 return true; | 241 return true; |
| 242 } | 242 } |
| 243 | 243 |
| 244 const InputMethodEngine::CandidateWindowProperty& | 244 const InputMethodEngine::CandidateWindowProperty& |
| 245 InputMethodEngine::GetCandidateWindowProperty() const { | 245 InputMethodEngine::GetCandidateWindowProperty() const { |
| 246 return candidate_window_property_; | 246 return candidate_window_property_; |
| 247 } | 247 } |
| 248 | 248 |
| 249 void InputMethodEngine::SetCandidateWindowProperty( | 249 void InputMethodEngine::SetCandidateWindowProperty( |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 // TODO(nona): Implement it. | 623 // TODO(nona): Implement it. |
| 624 break; | 624 break; |
| 625 } | 625 } |
| 626 } | 626 } |
| 627 } | 627 } |
| 628 | 628 |
| 629 // TODO(nona): Support item.children. | 629 // TODO(nona): Support item.children. |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace chromeos | 632 } // namespace chromeos |
| OLD | NEW |