Index: ash/display/window_tree_host_manager.cc |
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc |
index bce98e78e056894aeb9fad3559837a808bcb5f3d..073be1f74457c2d1573a7bfeefb9fffca100bf14 100644 |
--- a/ash/display/window_tree_host_manager.cc |
+++ b/ash/display/window_tree_host_manager.cc |
@@ -823,21 +823,18 @@ AshWindowTreeHost* WindowTreeHostManager::AddWindowTreeHostForDisplay( |
AshWindowTreeHost* ash_host = |
AshWindowTreeHost::Create(params_with_bounds).release(); |
aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); |
- // TODO: Config::MUS should not install an InputMethod. |
- // http://crbug.com/706913 |
- if (!host->has_input_method()) { |
- if (!input_method_) { // Singleton input method instance for Ash. |
- input_method_ = ui::CreateInputMethod(this, host->GetAcceleratedWidget()); |
- // Makes sure the input method is focused by default when created, because |
- // Ash uses singleton InputMethod and it won't call OnFocus/OnBlur when |
- // the active window changed. |
- input_method_->OnFocus(); |
- input_method_event_handler_.reset( |
- new InputMethodEventHandler(input_method_.get())); |
- } |
- host->SetSharedInputMethod(input_method_.get()); |
- ash_host->set_input_method_handler(input_method_event_handler_.get()); |
+ DCHECK(!host->has_input_method()); |
sky
2017/05/03 15:25:27
The plan is to use this code for both mash and mus
Hadi
2017/05/03 19:35:42
Done.
|
+ if (!input_method_) { // Singleton input method instance for Ash. |
+ input_method_ = ui::CreateInputMethod(this, host->GetAcceleratedWidget()); |
+ // Makes sure the input method is focused by default when created, because |
+ // Ash uses singleton InputMethod and it won't call OnFocus/OnBlur when |
+ // the active window changed. |
+ input_method_->OnFocus(); |
+ input_method_event_handler_.reset( |
+ new InputMethodEventHandler(input_method_.get())); |
} |
+ host->SetSharedInputMethod(input_method_.get()); |
+ ash_host->set_input_method_handler(input_method_event_handler_.get()); |
host->window()->SetName(base::StringPrintf( |
"%sRootWindow-%d", params_with_bounds.offscreen ? "Offscreen" : "", |