| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index 4ba0a582088f1b42b8aaae87dea89723fe347fd0..af14849a661f0064ea014fe9a709965c7b5d542e 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -16,6 +16,7 @@
|
| #include "ash/accessibility_delegate.h"
|
| #include "ash/app_list/app_list_delegate_impl.h"
|
| #include "ash/ash_constants.h"
|
| +#include "ash/ash_switches.h"
|
| #include "ash/aura/shell_port_classic.h"
|
| #include "ash/autoclick/autoclick_controller.h"
|
| #include "ash/cast_config_controller.h"
|
| @@ -309,6 +310,14 @@ Config Shell::GetAshConfig() {
|
| return Get()->shell_port_->GetAshConfig();
|
| }
|
|
|
| +// static
|
| +bool Shell::ShouldUseIMEService() {
|
| + return Shell::GetAshConfig() == Config::MASH ||
|
| + (Shell::GetAshConfig() == Config::MUS &&
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kUseIMEService));
|
| +}
|
| +
|
| views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
|
| views::Widget* widget) {
|
| // Use translucent-style window frames for dialogs.
|
| @@ -935,8 +944,9 @@ void Shell::Init(const ShellInitParams& init_params) {
|
| accelerator_controller_ = shell_port_->CreateAcceleratorController();
|
| maximize_mode_controller_ = base::MakeUnique<MaximizeModeController>();
|
|
|
| - if (config == Config::CLASSIC || config == Config::MUS) {
|
| - // Not applicable to mash as events are already routed to InputMethod first.
|
| + 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());
|
| }
|
|
|