Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: ui/base/ime/input_method_auralinux.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/base/ime/input_method_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/base/ime/input_method_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698