| 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 "ui/aura/test/event_generator_delegate_aura.h" | 5 #include "ui/aura/test/event_generator_delegate_aura.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "ui/aura/client/screen_position_client.h" | 9 #include "ui/aura/client/screen_position_client.h" |
| 10 #include "ui/aura/window_event_dispatcher.h" | 10 #include "ui/aura/window_event_dispatcher.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 if (client) | 120 if (client) |
| 121 client->ConvertPointFromScreen(target, point); | 121 client->ConvertPointFromScreen(target, point); |
| 122 else | 122 else |
| 123 aura::Window::ConvertPointToTarget(target->GetRootWindow(), target, point); | 123 aura::Window::ConvertPointToTarget(target->GetRootWindow(), target, point); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void EventGeneratorDelegateAura::ConvertPointFromHost( | 126 void EventGeneratorDelegateAura::ConvertPointFromHost( |
| 127 const ui::EventTarget* hosted_target, | 127 const ui::EventTarget* hosted_target, |
| 128 gfx::Point* point) const { | 128 gfx::Point* point) const { |
| 129 const Window* window = WindowFromTarget(hosted_target); | 129 const Window* window = WindowFromTarget(hosted_target); |
| 130 window->GetHost()->ConvertPointFromHost(point); | 130 window->GetHost()->ConvertPixelsToDIP(point); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void EventGeneratorDelegateAura::DispatchKeyEventToIME(ui::EventTarget* target, | 133 void EventGeneratorDelegateAura::DispatchKeyEventToIME(ui::EventTarget* target, |
| 134 ui::KeyEvent* event) { | 134 ui::KeyEvent* event) { |
| 135 Window* window = static_cast<Window*>(target); | 135 Window* window = static_cast<Window*>(target); |
| 136 window->GetHost()->GetInputMethod()->DispatchKeyEvent(event); | 136 window->GetHost()->GetInputMethod()->DispatchKeyEvent(event); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace test | 139 } // namespace test |
| 140 } // namespace aura | 140 } // namespace aura |
| OLD | NEW |