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 "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
10 #include "ui/aura/mus/window_tree_host_mus_init_params.h" | 11 #include "ui/aura/mus/window_tree_host_mus_init_params.h" |
11 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
12 #include "ui/events/event_sink.h" | 13 #include "ui/events/event_sink.h" |
13 #include "ui/events/null_event_targeter.h" | 14 #include "ui/events/null_event_targeter.h" |
14 | 15 |
15 namespace ash { | 16 namespace ash { |
16 | 17 |
17 AshWindowTreeHostMus::AshWindowTreeHostMus( | 18 AshWindowTreeHostMus::AshWindowTreeHostMus( |
18 aura::WindowTreeHostMusInitParams init_params) | 19 aura::WindowTreeHostMusInitParams init_params) |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 79 |
79 gfx::Transform AshWindowTreeHostMus::GetInverseRootTransform() const { | 80 gfx::Transform AshWindowTreeHostMus::GetInverseRootTransform() const { |
80 return transformer_helper_->GetInverseTransform(); | 81 return transformer_helper_->GetInverseTransform(); |
81 } | 82 } |
82 | 83 |
83 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( | 84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( |
84 const gfx::Size& host_size_in_pixels) { | 85 const gfx::Size& host_size_in_pixels) { |
85 transformer_helper_->UpdateWindowSize(host_size_in_pixels); | 86 transformer_helper_->UpdateWindowSize(host_size_in_pixels); |
86 } | 87 } |
87 | 88 |
| 89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME( |
| 90 ui::KeyEvent* event) { |
| 91 // input_method_handler() can be null when using IME service with --mus. |
| 92 if (input_method_handler()) |
| 93 input_method_handler()->SetPostIME(true); |
| 94 ui::EventDispatchDetails details = SendEventToSink(event); |
| 95 if (input_method_handler() && !details.dispatcher_destroyed) |
| 96 input_method_handler()->SetPostIME(false); |
| 97 return details; |
| 98 } |
| 99 |
88 } // namespace ash | 100 } // namespace ash |
OLD | NEW |