summaryrefslogtreecommitdiffstats
path: root/ui/aura/root_window_host_linux.cc
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-26 06:26:34 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-26 06:26:34 +0000
commit2c456105d14b69eb73d007bfc905a5c036d98af3 (patch)
treebcc98deebd9d7e22184cbadf826e3ba75179ac4d /ui/aura/root_window_host_linux.cc
parentea049a01f82647dc12e4001c8be03e4124faaff3 (diff)
downloadchromium_src-2c456105d14b69eb73d007bfc905a5c036d98af3.zip
chromium_src-2c456105d14b69eb73d007bfc905a5c036d98af3.tar.gz
chromium_src-2c456105d14b69eb73d007bfc905a5c036d98af3.tar.bz2
IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash.
Part 1: http://codereview.chromium.org/8659033/ Part 2: http://codereview.chromium.org/8687027/ The basic design of the feature is that to use an input method as an event filter for a KeyEvent, and to feed all KeyPress and KeyRelease events that are passed to the filter to the input method. The input method sends IME results (e.g. composition text) to RenderWidgetHostViewAura or NativeWidgetAura as needed. RenderWidgetHostViewAura: - Just like RWHVV, implements ui::TextInputClient interface so that RWHVA could receive an event such as 'SetComposition' and 'InsertChar' from an input method object owned by InputMethodEventFilter. - Sends a notification to the input method object on focus, blur, text input type change, etc. - OnKeyEvent() handler is now able to handle a non-native key event, e.g. a VKEY_PROCESSKEY event, which is fabricated by the input method editor. NativeWidgetAura: - Uses views::InputMethodBridge instead of views::InputMethodIBus. - InputMethodBridge, which implements ui::TextInputClient interface, just receives IME results (e.g. composition text) from ui::InputMethod and forwards them to Views UI (e.g. a text field). - InputMethodBridge also receives a request like 'CancelComposition' from the UI and forwards the request to ui::InputMethod. InputMethodEventFilter: - Creates and owns a ui::InputMethodIBus object. If IBus-1.4 is not available (e.g. Windows and Goobuntu), creates an instance of ui::MockInputMethod instead. - In PreHandleKeyEvent(), sends a KeyPress and KeyRelease event to the input method. - Implements ui::InputMethodDelegate interface so that InputMethodEventFilter could receive a translated key press and key release event (i.e. a key event translated by the IME) which has to be sent back to the root window. Note that the translated key event might be pre-handled by a global short-cut key event filter, otherwise is sent to NWA or RWHVA from the root window. Also note that a Char event is always sent directly from the input method to a TextInputClient. The ui::InputMethodDelegate is not used for that purpose. Supported platforms: - Aura + Chrome OS (IME works!) - Aura + Chrome OS + TOUCH_UI (compiles, but virtual keyboard is not shown since views::TextInputTypeTracker is not ported to Aura yet.) - Aura + Linux, with and without IBus-1.4 - Aura + Windows (compiles, but IME does not work. views::InputMethodWin is not ported to Aura yet.) BUG=97261 TEST=ran input_method_event_filter_unittests.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113224 Review URL: http://codereview.chromium.org/8576005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/root_window_host_linux.cc')
-rw-r--r--ui/aura/root_window_host_linux.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index 0857a9f..602dc4d 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -395,10 +395,6 @@ base::MessagePumpDispatcher::DispatchStatus RootWindowHostLinux::Dispatch(
case KeyPress: {
KeyEvent keydown_event(xev, false);
handled = root_window_->DispatchKeyEvent(&keydown_event);
- if (ShouldSendCharEventForKeyboardCode(keydown_event.key_code())) {
- KeyEvent char_event(xev, true);
- handled |= root_window_->DispatchKeyEvent(&char_event);
- }
break;
}
case KeyRelease: {