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

Unified Diff: content/browser/frame_host/cross_process_frame_connector.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Created 4 years 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/frame_host/cross_process_frame_connector.cc
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc
index d6fd0f756c171a7556cf56081cb417660731d464..3c8051ac2bc2a77bdb7b12aa91fa7bde8facd4ca 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -193,8 +193,8 @@ void CrossProcessFrameConnector::ForwardProcessAckedTouchEvent(
void CrossProcessFrameConnector::BubbleScrollEvent(
const blink::WebGestureEvent& event) {
- DCHECK(event.type == blink::WebInputEvent::GestureScrollUpdate ||
- event.type == blink::WebInputEvent::GestureScrollEnd);
+ DCHECK(event.type() == blink::WebInputEvent::GestureScrollUpdate ||
+ event.type() == blink::WebInputEvent::GestureScrollEnd);
auto* parent_view = GetParentRenderWidgetHostView();
if (!parent_view)
@@ -211,10 +211,10 @@ void CrossProcessFrameConnector::BubbleScrollEvent(
// See https://crbug.com/626020.
resent_gesture_event.x += offset_from_parent.x();
resent_gesture_event.y += offset_from_parent.y();
- if (event.type == blink::WebInputEvent::GestureScrollUpdate) {
+ if (event.type() == blink::WebInputEvent::GestureScrollUpdate) {
event_router->BubbleScrollEvent(parent_view, resent_gesture_event);
is_scroll_bubbling_ = true;
- } else if (event.type == blink::WebInputEvent::GestureScrollEnd &&
+ } else if (event.type() == blink::WebInputEvent::GestureScrollEnd &&
is_scroll_bubbling_) {
event_router->BubbleScrollEvent(parent_view, resent_gesture_event);
is_scroll_bubbling_ = false;
@@ -263,7 +263,7 @@ void CrossProcessFrameConnector::OnForwardInputEvent(
// are directly target using RenderWidgetHostInputEventRouter. But neither
// pathway is currently handling gesture events, so that needs to be fixed
// in a subsequent CL.
- if (blink::WebInputEvent::isKeyboardEventType(event->type)) {
+ if (blink::WebInputEvent::isKeyboardEventType(event->type())) {
if (!parent_widget->GetLastKeyboardEvent())
return;
NativeWebKeyboardEvent keyboard_event(
@@ -272,7 +272,7 @@ void CrossProcessFrameConnector::OnForwardInputEvent(
return;
}
- if (blink::WebInputEvent::isMouseEventType(event->type)) {
+ if (blink::WebInputEvent::isMouseEventType(event->type())) {
// TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
// https://crbug.com/613628
ui::LatencyInfo latency_info;
@@ -281,7 +281,7 @@ void CrossProcessFrameConnector::OnForwardInputEvent(
return;
}
- if (event->type == blink::WebInputEvent::MouseWheel) {
+ if (event->type() == blink::WebInputEvent::MouseWheel) {
// TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
// https://crbug.com/613628
ui::LatencyInfo latency_info;

Powered by Google App Engine
This is Rietveld 408576698