OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/renderer_host/input/synthetic_gesture_target_base.h" | 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
6 | 6 |
7 #include "content/browser/renderer_host/render_widget_host_impl.h" | 7 #include "content/browser/renderer_host/render_widget_host_impl.h" |
8 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 8 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
9 #include "content/browser/renderer_host/ui_events_helper.h" | 9 #include "content/browser/renderer_host/ui_events_helper.h" |
| 10 #include "content/common/input/web_input_event_traits.h" |
10 #include "content/common/input_messages.h" | 11 #include "content/common/input_messages.h" |
11 #include "third_party/WebKit/public/web/WebInputEvent.h" | 12 #include "third_party/WebKit/public/web/WebInputEvent.h" |
12 #include "ui/events/event.h" | 13 #include "ui/events/event.h" |
13 #include "ui/events/latency_info.h" | 14 #include "ui/events/latency_info.h" |
14 | 15 |
15 using blink::WebInputEvent; | 16 using blink::WebInputEvent; |
16 using blink::WebTouchEvent; | 17 using blink::WebTouchEvent; |
17 using blink::WebTouchPoint; | 18 using blink::WebTouchPoint; |
18 using blink::WebMouseEvent; | 19 using blink::WebMouseEvent; |
19 using blink::WebMouseWheelEvent; | 20 using blink::WebMouseWheelEvent; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return 0.0f; | 129 return 0.0f; |
129 } | 130 } |
130 | 131 |
131 bool SyntheticGestureTargetBase::PointIsWithinContents(int x, int y) const { | 132 bool SyntheticGestureTargetBase::PointIsWithinContents(int x, int y) const { |
132 gfx::Rect bounds = host_->GetView()->GetViewBounds(); | 133 gfx::Rect bounds = host_->GetView()->GetViewBounds(); |
133 bounds -= bounds.OffsetFromOrigin(); // Translate the bounds to (0,0). | 134 bounds -= bounds.OffsetFromOrigin(); // Translate the bounds to (0,0). |
134 return bounds.Contains(x, y); | 135 return bounds.Contains(x, y); |
135 } | 136 } |
136 | 137 |
137 } // namespace content | 138 } // namespace content |
OLD | NEW |