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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a few checks. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1138
1139 void RenderWidgetHostViewAura::ProcessAckedTouchEvent( 1139 void RenderWidgetHostViewAura::ProcessAckedTouchEvent(
1140 const TouchEventWithLatencyInfo& touch, 1140 const TouchEventWithLatencyInfo& touch,
1141 InputEventAckState ack_result) { 1141 InputEventAckState ack_result) {
1142 ScopedVector<ui::TouchEvent> events; 1142 ScopedVector<ui::TouchEvent> events;
1143 aura::WindowTreeHost* host = window_->GetHost(); 1143 aura::WindowTreeHost* host = window_->GetHost();
1144 // |host| is NULL during tests. 1144 // |host| is NULL during tests.
1145 if (!host) 1145 if (!host)
1146 return; 1146 return;
1147 1147
1148 // The TouchScrollStarted event is generated & consumed downstream from the
1149 // TouchEventQueue. So we don't expect an ACK up here.
1150 DCHECK(touch.event.type != blink::WebInputEvent::TouchScrollStarted);
1151
1148 ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) 1152 ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
1149 ? ui::ER_HANDLED 1153 ? ui::ER_HANDLED
1150 : ui::ER_UNHANDLED; 1154 : ui::ER_UNHANDLED;
1151 1155
1152 blink::WebTouchPoint::State required_state; 1156 blink::WebTouchPoint::State required_state;
1153 switch (touch.event.type) { 1157 switch (touch.event.type) {
1154 case blink::WebInputEvent::TouchStart: 1158 case blink::WebInputEvent::TouchStart:
1155 required_state = blink::WebTouchPoint::StatePressed; 1159 required_state = blink::WebTouchPoint::StatePressed;
1156 break; 1160 break;
1157 case blink::WebInputEvent::TouchEnd: 1161 case blink::WebInputEvent::TouchEnd:
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
2933 2937
2934 //////////////////////////////////////////////////////////////////////////////// 2938 ////////////////////////////////////////////////////////////////////////////////
2935 // RenderWidgetHostViewBase, public: 2939 // RenderWidgetHostViewBase, public:
2936 2940
2937 // static 2941 // static
2938 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2942 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2939 GetScreenInfoForWindow(results, NULL); 2943 GetScreenInfoForWindow(results, NULL);
2940 } 2944 }
2941 2945
2942 } // namespace content 2946 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698