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

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: cleanup 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
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 15a14396aaa9bf92e76819c1652ba0350eb9aa5e..732cc8573ab6f563000ad9699400fce51d349c03 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
@@ -308,18 +308,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);

Powered by Google App Engine
This is Rietveld 408576698