| 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/input_method_auralinux.h" | 5 #include "ui/base/ime/input_method_auralinux.h" |
| 6 | 6 |
| 7 #include "base/environment.h" | 7 #include "base/environment.h" |
| 8 #include "ui/base/ime/linux/linux_input_method_context_factory.h" | 8 #include "ui/base/ime/linux/linux_input_method_context_factory.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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 allowed_to_fire_vkey_process_key_ = true; | 162 allowed_to_fire_vkey_process_key_ = true; |
| 163 vkey_processkey_flags_ = event.flags(); | 163 vkey_processkey_flags_ = event.flags(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void InputMethodAuraLinux::MaybeFireProcessKey() { | 166 void InputMethodAuraLinux::MaybeFireProcessKey() { |
| 167 if (!allowed_to_fire_vkey_process_key_) | 167 if (!allowed_to_fire_vkey_process_key_) |
| 168 return; | 168 return; |
| 169 | 169 |
| 170 const ui::KeyEvent fabricated_event(ET_KEY_PRESSED, | 170 const ui::KeyEvent fabricated_event(ET_KEY_PRESSED, |
| 171 VKEY_PROCESSKEY, | 171 VKEY_PROCESSKEY, |
| 172 vkey_processkey_flags_, | 172 vkey_processkey_flags_); |
| 173 false); // is_char | |
| 174 DispatchKeyEventPostIME(fabricated_event); | 173 DispatchKeyEventPostIME(fabricated_event); |
| 175 StopFiringProcessKey(); | 174 StopFiringProcessKey(); |
| 176 } | 175 } |
| 177 | 176 |
| 178 void InputMethodAuraLinux::StopFiringProcessKey() { | 177 void InputMethodAuraLinux::StopFiringProcessKey() { |
| 179 allowed_to_fire_vkey_process_key_ = false; | 178 allowed_to_fire_vkey_process_key_ = false; |
| 180 vkey_processkey_flags_ = 0; | 179 vkey_processkey_flags_ = 0; |
| 181 } | 180 } |
| 182 | 181 |
| 183 } // namespace ui | 182 } // namespace ui |
| OLD | NEW |