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

Unified Diff: ash/host/ash_window_tree_host_x11.cc

Issue 1209663002: Use EventHandler for IME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « ash/host/ash_window_tree_host_x11.h ('k') | ash/ime/input_method_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_window_tree_host_x11.cc
diff --git a/ash/host/ash_window_tree_host_x11.cc b/ash/host/ash_window_tree_host_x11.cc
index 9e3cdc0a0108fc22e870ce865f30ded3cbd772ed..979db19261d8f28c66f464acb82592d91796416a 100644
--- a/ash/host/ash_window_tree_host_x11.cc
+++ b/ash/host/ash_window_tree_host_x11.cc
@@ -15,6 +15,7 @@
#include "ash/host/ash_window_tree_host_init_params.h"
#include "ash/host/ash_window_tree_host_unified.h"
#include "ash/host/root_window_transformer.h"
+#include "ash/ime/input_method_event_handler.h"
#include "base/basictypes.h"
#include "base/sys_info.h"
#include "ui/aura/env.h"
@@ -235,6 +236,19 @@ void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent(
SendEventToProcessor(event);
}
+bool AshWindowTreeHostX11::DispatchKeyEventPostIME(const ui::KeyEvent& event) {
+ ui::KeyEvent event_copy(event);
+ input_method_handler()->SetPostIME(true);
+ ui::EventSource::DeliverEventToProcessor(&event_copy);
+ input_method_handler()->SetPostIME(false);
+ return event_copy.handled();
+}
+
+ui::EventDispatchDetails AshWindowTreeHostX11::DeliverEventToProcessor(
+ ui::Event* event) {
+ return ui::EventSource::DeliverEventToProcessor(event);
+}
+
#if defined(OS_CHROMEOS)
void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
if (!ui::IsXInput2Available())
« no previous file with comments | « ash/host/ash_window_tree_host_x11.h ('k') | ash/ime/input_method_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698