Chromium Code Reviews| Index: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| index facbede3840f69d9b254bb04ee62a24bb08c2e75..eb81261c07cb54bcec21cecea2f39d78c1d31a97 100644 |
| --- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| +++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc |
| @@ -124,11 +124,18 @@ int WebMouseEventButtonToFlags(blink::WebMouseEvent::Button button) { |
| void SyntheticGestureTargetAura::DispatchWebMouseEventToPlatform( |
| const blink::WebMouseEvent& web_mouse, |
| const ui::LatencyInfo& latency_info) { |
| + aura::Window* window = render_widget_host()->GetView()->GetNativeView(); |
| + aura::Window* root_window = window->GetRootWindow(); |
| + aura::client::ScreenPositionClient* position_client = |
| + aura::client::GetScreenPositionClient(root_window); |
| + DCHECK(position_client); |
| + |
| gfx::Point location(web_mouse.x, web_mouse.y); |
| + position_client->ConvertPointToScreen(window, &location); |
|
Dominik Grewe
2013/12/18 10:33:53
I guess we should do the same for mouse wheel even
kouhei (in TOK)
2013/12/19 04:55:39
Done.
|
| + |
| ui::EventType event_type = WebMouseEventTypeToEventType(web_mouse.type); |
| int flags = WebMouseEventButtonToFlags(web_mouse.button); |
| - // TODO: last argument (changed_button_flags) likely isn't right. |
| - ui::MouseEvent mouse_event(event_type, location, location, flags, 0); |
| + ui::MouseEvent mouse_event(event_type, location, location, flags, flags); |
| GetRootWindowHostDelegate()->OnHostMouseEvent(&mouse_event); |
| } |