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

Unified Diff: ash/host/ash_window_tree_host_win.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_unified.cc ('k') | ash/host/ash_window_tree_host_x11.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_win.cc
diff --git a/ash/host/ash_window_tree_host_win.cc b/ash/host/ash_window_tree_host_win.cc
index e058599aa91737172485319164019880b2fb78c5..e7cca8bd9531d66b231c9aeef1c26e9f60cadcd1 100644
--- a/ash/host/ash_window_tree_host_win.cc
+++ b/ash/host/ash_window_tree_host_win.cc
@@ -10,6 +10,7 @@
#include "ash/host/ash_window_tree_host_init_params.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/win/windows_version.h"
#include "ui/aura/window_tree_host_win.h"
@@ -101,6 +102,20 @@ class AshWindowTreeHostWin : public AshWindowTreeHost,
transformer_helper_.UpdateWindowSize(host_size);
}
+ // ui::internal::InputMethodDelegate:
+ bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override {
+ 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::EventSource:
+ ui::EventDispatchDetails DeliverEventToProcessor(ui::Event* event) override {
+ return ui::EventSource::DeliverEventToProcessor(event);
+ }
+
bool fullscreen_;
RECT saved_window_rect_;
DWORD saved_window_style_;
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | ash/host/ash_window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698