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

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

Issue 2951973002: Reland of [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "content/browser/renderer_host/dip_util.h" 54 #include "content/browser/renderer_host/dip_util.h"
55 #include "content/browser/renderer_host/frame_metadata_util.h" 55 #include "content/browser/renderer_host/frame_metadata_util.h"
56 #include "content/browser/renderer_host/input/input_router.h" 56 #include "content/browser/renderer_host/input/input_router.h"
57 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " 57 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h "
58 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " 58 #include "content/browser/renderer_host/input/web_input_event_builders_android.h "
59 #include "content/browser/renderer_host/render_process_host_impl.h" 59 #include "content/browser/renderer_host/render_process_host_impl.h"
60 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 60 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
61 #include "content/browser/renderer_host/render_view_host_impl.h" 61 #include "content/browser/renderer_host/render_view_host_impl.h"
62 #include "content/browser/renderer_host/render_widget_host_impl.h" 62 #include "content/browser/renderer_host/render_widget_host_impl.h"
63 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 63 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
64 #include "content/browser/renderer_host/ui_events_helper.h"
64 #include "content/common/gpu_stream_constants.h" 65 #include "content/common/gpu_stream_constants.h"
65 #include "content/common/input_messages.h" 66 #include "content/common/input_messages.h"
66 #include "content/common/site_isolation_policy.h" 67 #include "content/common/site_isolation_policy.h"
67 #include "content/common/view_messages.h" 68 #include "content/common/view_messages.h"
68 #include "content/public/browser/android/compositor.h" 69 #include "content/public/browser/android/compositor.h"
69 #include "content/public/browser/android/synchronous_compositor_client.h" 70 #include "content/public/browser/android/synchronous_compositor_client.h"
70 #include "content/public/browser/browser_thread.h" 71 #include "content/public/browser/browser_thread.h"
71 #include "content/public/browser/devtools_agent_host.h" 72 #include "content/public/browser/devtools_agent_host.h"
72 #include "content/public/browser/render_view_host.h" 73 #include "content/public/browser/render_view_host.h"
73 #include "content/public/browser/render_widget_host_iterator.h" 74 #include "content/public/browser/render_widget_host_iterator.h"
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 1681
1681 // TODO(jrg): Find out the implications and answer correctly here, 1682 // TODO(jrg): Find out the implications and answer correctly here,
1682 // as we are returning the WebView and not root window bounds. 1683 // as we are returning the WebView and not root window bounds.
1683 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { 1684 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() {
1684 return GetViewBounds(); 1685 return GetViewBounds();
1685 } 1686 }
1686 1687
1687 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( 1688 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent(
1688 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { 1689 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
1689 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; 1690 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
1690 gesture_provider_.OnTouchEventAck(touch.event.unique_touch_event_id, 1691 gesture_provider_.OnTouchEventAck(
1691 event_consumed); 1692 touch.event.unique_touch_event_id, event_consumed,
1693 InputEventAckStateIsSetNonBlocking(ack_result));
1692 } 1694 }
1693 1695
1694 void RenderWidgetHostViewAndroid::GestureEventAck( 1696 void RenderWidgetHostViewAndroid::GestureEventAck(
1695 const blink::WebGestureEvent& event, 1697 const blink::WebGestureEvent& event,
1696 InputEventAckState ack_result) { 1698 InputEventAckState ack_result) {
1697 if (overscroll_controller_) 1699 if (overscroll_controller_)
1698 overscroll_controller_->OnGestureEventAck(event, ack_result); 1700 overscroll_controller_->OnGestureEventAck(event, ack_result);
1699 1701
1700 if (content_view_core_) 1702 if (content_view_core_)
1701 content_view_core_->OnGestureEventAck(event, ack_result); 1703 content_view_core_->OnGestureEventAck(event, ack_result);
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 2278
2277 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2279 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2278 if (!compositor) 2280 if (!compositor)
2279 return; 2281 return;
2280 2282
2281 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2283 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2282 overscroll_refresh_handler, compositor, view_.GetDipScale()); 2284 overscroll_refresh_handler, compositor, view_.GetDipScale());
2283 } 2285 }
2284 2286
2285 } // namespace content 2287 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/touch_emulator.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698