Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_base.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_gesture_target_base.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
index ae8f7e128e31a8123e389ea274bce728ec14900b..65667d802e9c5b95d49c9b08054c0563bd49f3d0 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
@@ -45,12 +45,12 @@ SyntheticGestureTargetBase::~SyntheticGestureTargetBase() {
void SyntheticGestureTargetBase::DispatchInputEventToPlatform(
const WebInputEvent& event) {
TRACE_EVENT1("input", "SyntheticGestureTarget::DispatchInputEventToPlatform",
- "type", WebInputEvent::GetName(event.type));
+ "type", WebInputEvent::GetName(event.type()));
ui::LatencyInfo latency_info;
latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0);
- if (WebInputEvent::isTouchEventType(event.type)) {
+ if (WebInputEvent::isTouchEventType(event.type())) {
const WebTouchEvent& web_touch =
static_cast<const WebTouchEvent&>(event);
@@ -62,16 +62,16 @@ void SyntheticGestureTargetBase::DispatchInputEventToPlatform(
<< "Touch coordinates are not within content bounds on TouchStart.";
DispatchWebTouchEventToPlatform(web_touch, latency_info);
- } else if (event.type == WebInputEvent::MouseWheel) {
+ } else if (event.type() == WebInputEvent::MouseWheel) {
const WebMouseWheelEvent& web_wheel =
static_cast<const WebMouseWheelEvent&>(event);
CHECK(PointIsWithinContents(web_wheel.x, web_wheel.y))
<< "Mouse wheel position is not within content bounds.";
DispatchWebMouseWheelEventToPlatform(web_wheel, latency_info);
- } else if (WebInputEvent::isMouseEventType(event.type)) {
+ } else if (WebInputEvent::isMouseEventType(event.type())) {
const WebMouseEvent& web_mouse =
static_cast<const WebMouseEvent&>(event);
- CHECK(event.type != WebInputEvent::MouseDown ||
+ CHECK(event.type() != WebInputEvent::MouseDown ||
PointIsWithinContents(web_mouse.x, web_mouse.y))
<< "Mouse pointer is not within content bounds on MouseDown.";
DispatchWebMouseEventToPlatform(web_mouse, latency_info);

Powered by Google App Engine
This is Rietveld 408576698