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

Unified Diff: ash/host/ash_window_tree_host_ozone.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.cc ('k') | ash/host/ash_window_tree_host_unified.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_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());
« no previous file with comments | « ash/host/ash_window_tree_host.cc ('k') | ash/host/ash_window_tree_host_unified.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698