| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/host/ash_remote_window_tree_host_win.h" | 5 #include "ash/host/ash_remote_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "ash/host/root_window_transformer.h" | 7 #include "ash/host/root_window_transformer.h" |
| 8 #include "ash/ime/input_method_event_handler.h" | 8 #include "ash/ime/input_method_event_handler.h" |
| 9 #include "ui/events/event_processor.h" | 9 #include "ui/events/event_processor.h" |
| 10 #include "ui/gfx/geometry/insets.h" | 10 #include "ui/gfx/geometry/insets.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const { | 52 gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const { |
| 53 return transformer_helper_.GetInverseTransform(); | 53 return transformer_helper_.GetInverseTransform(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize( | 56 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize( |
| 57 const gfx::Size& host_size) { | 57 const gfx::Size& host_size) { |
| 58 transformer_helper_.UpdateWindowSize(host_size); | 58 transformer_helper_.UpdateWindowSize(host_size); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME( | 61 ui::EventDispatchDetails AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME( |
| 62 const ui::KeyEvent& event) { | 62 ui::KeyEvent* event) { |
| 63 ui::KeyEvent event_copy(event); | |
| 64 input_method_handler()->SetPostIME(true); | 63 input_method_handler()->SetPostIME(true); |
| 65 ui::EventDispatchDetails details = | 64 ui::EventDispatchDetails details = |
| 66 event_processor()->OnEventFromSource(&event_copy); | 65 event_processor()->OnEventFromSource(event); |
| 67 if (details.dispatcher_destroyed) | 66 if (!details.dispatcher_destroyed) |
| 68 return true; | 67 input_method_handler()->SetPostIME(false); |
| 69 input_method_handler()->SetPostIME(false); | 68 return details; |
| 70 return event_copy.stopped_propagation(); | |
| 71 } | 69 } |
| 72 | 70 |
| 73 } // namespace ash | 71 } // namespace ash |
| OLD | NEW |