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

Unified Diff: ash/shell.cc

Issue 2909063002: Revert of Remove InputMethodEventHandler.
Patch Set: Created 3 years, 7 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/mus/ash_window_tree_host_mus.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 92616f6d1a2ee8cfdd554ffccaeaa5557eaab005..1d0284243fded2b80b215e974d6f699960c118f6 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -41,6 +41,7 @@
#include "ash/frame/custom_frame_view_ash.h"
#include "ash/gpu_support.h"
#include "ash/high_contrast/high_contrast_controller.h"
+#include "ash/ime/input_method_event_handler.h"
#include "ash/keyboard/keyboard_ui.h"
#include "ash/laser/laser_pointer_controller.h"
#include "ash/login/lock_screen_controller.h"
@@ -621,6 +622,10 @@ Shell::~Shell() {
// Please keep in same order as in Init() because it's easy to miss one.
if (window_modality_controller_)
window_modality_controller_.reset();
+ if (config != Config::MASH) {
+ RemovePreTargetHandler(
+ window_tree_host_manager_->input_method_event_handler());
+ }
RemovePreTargetHandler(magnifier_key_scroll_handler_.get());
magnifier_key_scroll_handler_.reset();
@@ -951,6 +956,13 @@ void Shell::Init(const ShellInitParams& init_params) {
accelerator_controller_ = shell_port_->CreateAcceleratorController();
maximize_mode_controller_ = base::MakeUnique<MaximizeModeController>();
+ if (!ShouldUseIMEService()) {
+ // Not applicable when using IME service as events are already routed to
+ // InputMethod first.
+ AddPreTargetHandler(
+ window_tree_host_manager_->input_method_event_handler());
+ }
+
magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler();
AddPreTargetHandler(magnifier_key_scroll_handler_.get());
speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler();
« no previous file with comments | « ash/mus/ash_window_tree_host_mus.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698