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

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: 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/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 f2289312f020c5c17a95c9a8528c8dee3de94df3..ec4c47655502ab93415f4c514034c9b579351a6d 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -184,8 +184,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)
@@ -202,10 +202,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;
@@ -254,7 +254,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(
@@ -263,7 +263,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;
@@ -272,7 +272,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;
« no previous file with comments | « content/browser/devtools/protocol/color_picker.cc ('k') | content/browser/frame_host/render_widget_host_view_child_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698