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

Unified Diff: chrome/browser/chromeos/input_method/input_method_engine.cc

Issue 1284433002: Revise ui::DomKey to unify character and non-character codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsDead Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/events/keyboard_driven_event_rewriter.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_engine.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc
index 8d8522012566fb4a1e9894598b0fc5fb64226230..4fc93b23f165b3f9358920cf6803418db4058189 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
@@ -309,18 +309,10 @@ bool InputMethodEngine::SendKeyEvents(
flags |= event.shift_key ? ui::EF_SHIFT_DOWN : ui::EF_NONE;
flags |= event.caps_lock ? ui::EF_CAPS_LOCK_DOWN : ui::EF_NONE;
- base::char16 ch = 0;
- // 4-bytes UTF-8 string is at least 2-characters UTF-16 string.
- // And Key char can only be single UTF-16 character.
- if (!event.key.empty() && event.key.size() < 4) {
- base::string16 key_char = base::UTF8ToUTF16(event.key);
- if (key_char.size() == 1)
- ch = key_char[0];
- }
ui::KeyEvent ui_event(
type, key_code,
ui::KeycodeConverter::CodeStringToDomCode(event.code.c_str()), flags,
- ui::KeycodeConverter::KeyStringToDomKey(event.key.c_str()), ch,
+ ui::KeycodeConverter::KeyStringToDomKey(event.key.c_str()),
ui::EventTimeForNow());
base::AutoReset<const ui::KeyEvent*> reset_sent_key(&sent_key_event_,
&ui_event);
« no previous file with comments | « chrome/browser/chromeos/events/keyboard_driven_event_rewriter.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698