| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/mus/ash_window_tree_host_mus.h" | 5 #include "ash/mus/ash_window_tree_host_mus.h" |
| 6 | 6 |
| 7 #include "ash/host/root_window_transformer.h" | 7 #include "ash/host/root_window_transformer.h" |
| 8 #include "ash/host/transformer_helper.h" | 8 #include "ash/host/transformer_helper.h" |
| 9 #include "ash/ime/input_method_event_handler.h" | 9 #include "ash/ime/input_method_event_handler.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 return transformer_helper_->GetInverseTransform(); | 81 return transformer_helper_->GetInverseTransform(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( | 84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( |
| 85 const gfx::Size& host_size_in_pixels) { | 85 const gfx::Size& host_size_in_pixels) { |
| 86 transformer_helper_->UpdateWindowSize(host_size_in_pixels); | 86 transformer_helper_->UpdateWindowSize(host_size_in_pixels); |
| 87 } | 87 } |
| 88 | 88 |
| 89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME( | 89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME( |
| 90 ui::KeyEvent* event) { | 90 ui::KeyEvent* event) { |
| 91 input_method_handler()->SetPostIME(true); | 91 // input_method_handler() can be null when using IME service with --mus. |
| 92 if (input_method_handler()) |
| 93 input_method_handler()->SetPostIME(true); |
| 92 ui::EventDispatchDetails details = SendEventToSink(event); | 94 ui::EventDispatchDetails details = SendEventToSink(event); |
| 93 if (!details.dispatcher_destroyed) | 95 if (input_method_handler() && !details.dispatcher_destroyed) |
| 94 input_method_handler()->SetPostIME(false); | 96 input_method_handler()->SetPostIME(false); |
| 95 return details; | 97 return details; |
| 96 } | 98 } |
| 97 | 99 |
| 98 } // namespace ash | 100 } // namespace ash |
| OLD | NEW |