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

Unified Diff: ash/mus/ash_window_tree_host_mus.cc

Issue 2831583005: Enable Config::MUS to use classic IME instead of servicified IME. (Closed)
Patch Set: cleanup. Created 3 years, 8 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
Index: ash/mus/ash_window_tree_host_mus.cc
diff --git a/ash/mus/ash_window_tree_host_mus.cc b/ash/mus/ash_window_tree_host_mus.cc
index 52cb894ff83f132650fd420151375c2b34959af9..151a1a5593fb68224f7d05cc4d9369d2603e851e 100644
--- a/ash/mus/ash_window_tree_host_mus.cc
+++ b/ash/mus/ash_window_tree_host_mus.cc
@@ -6,9 +6,11 @@
#include "ash/host/root_window_transformer.h"
#include "ash/host/transformer_helper.h"
+#include "ash/ime/input_method_event_handler.h"
#include "base/memory/ptr_util.h"
#include "ui/aura/mus/window_tree_host_mus_init_params.h"
#include "ui/aura/window.h"
+#include "ui/events/event_sink.h"
#include "ui/events/null_event_targeter.h"
namespace ash {
@@ -84,4 +86,13 @@ void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels(
transformer_helper_->UpdateWindowSize(host_size_in_pixels);
}
+ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME(
sky 2017/05/04 03:09:18 Can you elaborate on why this is the right fix? Wh
Hadi 2017/05/04 12:15:17 The implementation here was based on what AshWindo
+ ui::KeyEvent* event) {
+ input_method_handler()->SetPostIME(true);
+ ui::EventDispatchDetails details = event_sink()->OnEventFromSource(event);
+ if (!details.dispatcher_destroyed)
+ input_method_handler()->SetPostIME(false);
+ return details;
+}
+
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698