Index: ash/host/ash_window_tree_host_ozone.cc |
diff --git a/ash/host/ash_window_tree_host_ozone.cc b/ash/host/ash_window_tree_host_ozone.cc |
index 4e1f09b53f5e31e3d04b0eb15bda900f74902c97..3926fdff12425cf19e57a6def2fa79834016e7de 100644 |
--- a/ash/host/ash_window_tree_host_ozone.cc |
+++ b/ash/host/ash_window_tree_host_ozone.cc |
@@ -8,6 +8,7 @@ |
#include "ash/host/ash_window_tree_host_unified.h" |
#include "ash/host/root_window_transformer.h" |
#include "ash/host/transformer_helper.h" |
+#include "ash/ime/input_method_event_handler.h" |
#include "base/command_line.h" |
#include "base/trace_event/trace_event.h" |
#include "ui/aura/window.h" |
@@ -46,6 +47,14 @@ class AshWindowTreeHostOzone : public AshWindowTreeHost, |
void SetBounds(const gfx::Rect& bounds) override; |
void DispatchEvent(ui::Event* event) override; |
+ // ui::internal::InputMethodDelegate: |
+ bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override; |
+ |
+ // ui::EventSource: |
+ ui::EventDispatchDetails DeliverEventToProcessor(ui::Event* event) override { |
+ return ui::EventSource::DeliverEventToProcessor(event); |
+ } |
+ |
// Temporarily disable the tap-to-click feature. Used on CrOS. |
void SetTapToClickPaused(bool state); |
@@ -132,6 +141,15 @@ void AshWindowTreeHostOzone::DispatchEvent(ui::Event* event) { |
SendEventToProcessor(event); |
} |
+bool AshWindowTreeHostOzone::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(); |
+} |
+ |
void AshWindowTreeHostOzone::SetTapToClickPaused(bool state) { |
#if defined(OS_CHROMEOS) |
DCHECK(ui::OzonePlatform::GetInstance()->GetInputController()); |