| 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 "ui/gfx/geometry/insets.h" | 9 #include "ui/gfx/geometry/insets.h" |
| 9 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
| 10 | 11 |
| 11 namespace ash { | 12 namespace ash { |
| 12 | 13 |
| 13 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd) | 14 AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd) |
| 14 : aura::RemoteWindowTreeHostWin(), | 15 : aura::RemoteWindowTreeHostWin(), |
| 15 transformer_helper_(this) { | 16 transformer_helper_(this) { |
| 16 SetRemoteWindowHandle(remote_hwnd); | 17 SetRemoteWindowHandle(remote_hwnd); |
| 17 transformer_helper_.Init(); | 18 transformer_helper_.Init(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 50 |
| 50 gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const { | 51 gfx::Transform AshRemoteWindowTreeHostWin::GetInverseRootTransform() const { |
| 51 return transformer_helper_.GetInverseTransform(); | 52 return transformer_helper_.GetInverseTransform(); |
| 52 } | 53 } |
| 53 | 54 |
| 54 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize( | 55 void AshRemoteWindowTreeHostWin::UpdateRootWindowSize( |
| 55 const gfx::Size& host_size) { | 56 const gfx::Size& host_size) { |
| 56 transformer_helper_.UpdateWindowSize(host_size); | 57 transformer_helper_.UpdateWindowSize(host_size); |
| 57 } | 58 } |
| 58 | 59 |
| 60 bool AshRemoteWindowTreeHostWin::DispatchKeyEventPostIME( |
| 61 const ui::KeyEvent& event) { |
| 62 ui::KeyEvent event_copy(event); |
| 63 input_method_handler()->SetPostIME(true); |
| 64 ui::EventSource::DeliverEventToProcessor(&event_copy); |
| 65 input_method_handler()->SetPostIME(false); |
| 66 return event_copy.handled(); |
| 67 } |
| 68 |
| 69 ui::EventDispatchDetails AshRemoteWindowTreeHostWin::DeliverEventToProcessor( |
| 70 ui::Event* event) { |
| 71 return ui::EventSource::DeliverEventToProcessor(event); |
| 72 } |
| 73 |
| 59 } // namespace ash | 74 } // namespace ash |
| OLD | NEW |