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" |
13 #include "ui/events/event_sink.h" | |
12 #include "ui/events/null_event_targeter.h" | 14 #include "ui/events/null_event_targeter.h" |
13 | 15 |
14 namespace ash { | 16 namespace ash { |
15 | 17 |
16 AshWindowTreeHostMus::AshWindowTreeHostMus( | 18 AshWindowTreeHostMus::AshWindowTreeHostMus( |
17 aura::WindowTreeHostMusInitParams init_params) | 19 aura::WindowTreeHostMusInitParams init_params) |
18 : aura::WindowTreeHostMus(std::move(init_params)), | 20 : aura::WindowTreeHostMus(std::move(init_params)), |
19 transformer_helper_(base::MakeUnique<TransformerHelper>(this)) { | 21 transformer_helper_(base::MakeUnique<TransformerHelper>(this)) { |
20 transformer_helper_->Init(); | 22 transformer_helper_->Init(); |
21 } | 23 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 | 79 |
78 gfx::Transform AshWindowTreeHostMus::GetInverseRootTransform() const { | 80 gfx::Transform AshWindowTreeHostMus::GetInverseRootTransform() const { |
79 return transformer_helper_->GetInverseTransform(); | 81 return transformer_helper_->GetInverseTransform(); |
80 } | 82 } |
81 | 83 |
82 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( | 84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( |
83 const gfx::Size& host_size_in_pixels) { | 85 const gfx::Size& host_size_in_pixels) { |
84 transformer_helper_->UpdateWindowSize(host_size_in_pixels); | 86 transformer_helper_->UpdateWindowSize(host_size_in_pixels); |
85 } | 87 } |
86 | 88 |
89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME( | |
sky
2017/05/04 03:09:18
Can you elaborate on why this is the right fix? Wh
Hadi
2017/05/04 12:15:17
The implementation here was based on what AshWindo
| |
90 ui::KeyEvent* event) { | |
91 input_method_handler()->SetPostIME(true); | |
92 ui::EventDispatchDetails details = event_sink()->OnEventFromSource(event); | |
93 if (!details.dispatcher_destroyed) | |
94 input_method_handler()->SetPostIME(false); | |
95 return details; | |
96 } | |
97 | |
87 } // namespace ash | 98 } // namespace ash |
OLD | NEW |