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

Unified Diff: ui/base/ime/input_method_chromeos.cc

Issue 324903002: Remoes X11 dependency in InputMethodEngine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 6 years, 6 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 | « ui/base/ime/chromeos/ime_keymap.cc ('k') | ui/events/cocoa/events_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_chromeos.cc
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc
index be946ed0dc8079ac364c80ba1bc10d720486708a..091b3fd566e9b17923744f435a57a004de9abfe8 100644
--- a/ui/base/ime/input_method_chromeos.cc
+++ b/ui/base/ime/input_method_chromeos.cc
@@ -19,11 +19,6 @@
#include "chromeos/ime/composition_text.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/events/event.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_utils.h"
-#include "ui/events/keycodes/keyboard_code_conversion.h"
-#include "ui/events/keycodes/keyboard_code_conversion_x.h"
-#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/rect.h"
namespace {
@@ -377,23 +372,9 @@ void InputMethodChromeOS::ProcessUnfilteredKeyPressEvent(
// If a key event was not filtered by |context_| and |character_composer_|,
// then it means the key event didn't generate any result text. So we need
// to send corresponding character to the focused text input client.
- const uint32 event_flags = event.flags();
- uint16 ch = 0;
- if (event.HasNativeEvent()) {
- const base::NativeEvent& native_event = event.native_event();
-
- if (!(event_flags & ui::EF_CONTROL_DOWN))
- ch = ui::GetCharacterFromXEvent(native_event);
- if (!ch) {
- ch = ui::GetCharacterFromKeyCode(
- ui::KeyboardCodeFromNative(native_event), event_flags);
- }
- } else {
- ch = ui::GetCharacterFromKeyCode(event.key_code(), event_flags);
- }
-
+ uint16 ch = event.GetCharacter();
if (ch)
- client->InsertChar(ch, event_flags);
+ client->InsertChar(ch, event.flags());
}
void InputMethodChromeOS::ProcessInputMethodResult(const ui::KeyEvent& event,
« no previous file with comments | « ui/base/ime/chromeos/ime_keymap.cc ('k') | ui/events/cocoa/events_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698