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

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

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: dtapuska's comment: Use ack to determine blocking vs. non-blocking Created 3 years, 6 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_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 } 1658 }
1659 1659
1660 // TODO(jrg): Find out the implications and answer correctly here, 1660 // TODO(jrg): Find out the implications and answer correctly here,
1661 // as we are returning the WebView and not root window bounds. 1661 // as we are returning the WebView and not root window bounds.
1662 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { 1662 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() {
1663 return GetViewBounds(); 1663 return GetViewBounds();
1664 } 1664 }
1665 1665
1666 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( 1666 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent(
1667 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { 1667 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
1668 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; 1668 const ui::EventResult event_result =
dtapuska 2017/05/25 15:40:12 Why is this different than aura?
1669 ack_result == INPUT_EVENT_ACK_STATE_CONSUMED ? ui::ER_CONSUMED
1670 : ui::ER_UNHANDLED;
1669 gesture_provider_.OnTouchEventAck(touch.event.unique_touch_event_id, 1671 gesture_provider_.OnTouchEventAck(touch.event.unique_touch_event_id,
1670 event_consumed); 1672 event_result);
1671 } 1673 }
1672 1674
1673 void RenderWidgetHostViewAndroid::GestureEventAck( 1675 void RenderWidgetHostViewAndroid::GestureEventAck(
1674 const blink::WebGestureEvent& event, 1676 const blink::WebGestureEvent& event,
1675 InputEventAckState ack_result) { 1677 InputEventAckState ack_result) {
1676 if (overscroll_controller_) 1678 if (overscroll_controller_)
1677 overscroll_controller_->OnGestureEventAck(event, ack_result); 1679 overscroll_controller_->OnGestureEventAck(event, ack_result);
1678 1680
1679 if (content_view_core_) 1681 if (content_view_core_)
1680 content_view_core_->OnGestureEventAck(event, ack_result); 1682 content_view_core_->OnGestureEventAck(event, ack_result);
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 2240
2239 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2241 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2240 if (!compositor) 2242 if (!compositor)
2241 return; 2243 return;
2242 2244
2243 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2245 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2244 overscroll_refresh_handler, compositor, view_.GetDipScale()); 2246 overscroll_refresh_handler, compositor, view_.GetDipScale());
2245 } 2247 }
2246 2248
2247 } // namespace content 2249 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698