| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ui/input_method/input_method_engine_base.h" | 5 #include "chrome/browser/ui/input_method/input_method_engine_base.h" |
| 6 | 6 |
| 7 #undef FocusIn | 7 #undef FocusIn |
| 8 #undef FocusOut | 8 #undef FocusOut |
| 9 #undef RootWindow | 9 #undef RootWindow |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 #else | 141 #else |
| 142 ext_event->key = ui::KeycodeConverter::DomKeyToKeyString(event.GetDomKey()); | 142 ext_event->key = ui::KeycodeConverter::DomKeyToKeyString(event.GetDomKey()); |
| 143 #endif // defined(OS_CHROMEOS) | 143 #endif // defined(OS_CHROMEOS) |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace | 146 } // namespace |
| 147 | 147 |
| 148 InputMethodEngineBase::KeyboardEvent::KeyboardEvent() | 148 InputMethodEngineBase::KeyboardEvent::KeyboardEvent() |
| 149 : alt_key(false), ctrl_key(false), shift_key(false), caps_lock(false) {} | 149 : alt_key(false), ctrl_key(false), shift_key(false), caps_lock(false) {} |
| 150 | 150 |
| 151 InputMethodEngineBase::KeyboardEvent::KeyboardEvent( |
| 152 const KeyboardEvent& other) = default; |
| 153 |
| 151 InputMethodEngineBase::KeyboardEvent::~KeyboardEvent() {} | 154 InputMethodEngineBase::KeyboardEvent::~KeyboardEvent() {} |
| 152 | 155 |
| 153 InputMethodEngineBase::InputMethodEngineBase() | 156 InputMethodEngineBase::InputMethodEngineBase() |
| 154 : current_input_type_(ui::TEXT_INPUT_TYPE_NONE), | 157 : current_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
| 155 context_id_(0), | 158 context_id_(0), |
| 156 next_context_id_(1), | 159 next_context_id_(1), |
| 157 composition_text_(new ui::CompositionText()), | 160 composition_text_(new ui::CompositionText()), |
| 158 composition_cursor_(0), | 161 composition_cursor_(0), |
| 159 sent_key_event_(nullptr), | 162 sent_key_event_(nullptr), |
| 160 profile_(nullptr), | 163 profile_(nullptr), |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 ui::EventTimeForNow()); | 450 ui::EventTimeForNow()); |
| 448 base::AutoReset<const ui::KeyEvent*> reset_sent_key(&sent_key_event_, | 451 base::AutoReset<const ui::KeyEvent*> reset_sent_key(&sent_key_event_, |
| 449 &ui_event); | 452 &ui_event); |
| 450 if (!SendKeyEvent(&ui_event, event.code)) | 453 if (!SendKeyEvent(&ui_event, event.code)) |
| 451 return false; | 454 return false; |
| 452 } | 455 } |
| 453 return true; | 456 return true; |
| 454 } | 457 } |
| 455 | 458 |
| 456 } // namespace input_method | 459 } // namespace input_method |
| OLD | NEW |