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

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

Issue 680413006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sadrul's comments. Created 6 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 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 "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 775
776 if (!gesture_provider_.OnTouchEvent(event)) 776 if (!gesture_provider_.OnTouchEvent(event))
777 return false; 777 return false;
778 778
779 if (host_->ShouldForwardTouchEvent()) { 779 if (host_->ShouldForwardTouchEvent()) {
780 blink::WebTouchEvent web_event = CreateWebTouchEventFromMotionEvent(event); 780 blink::WebTouchEvent web_event = CreateWebTouchEventFromMotionEvent(event);
781 host_->ForwardTouchEventWithLatencyInfo(web_event, 781 host_->ForwardTouchEventWithLatencyInfo(web_event,
782 CreateLatencyInfo(web_event)); 782 CreateLatencyInfo(web_event));
783 } else { 783 } else {
784 const bool event_consumed = false; 784 const bool event_consumed = false;
785 gesture_provider_.OnTouchEventAck(event_consumed); 785 gesture_provider_.OnAsyncTouchEventAck(event_consumed);
786 } 786 }
787 787
788 // Send a proactive BeginFrame on the next vsync to reduce latency. 788 // Send a proactive BeginFrame on the next vsync to reduce latency.
789 // This is good enough as long as the first touch event has Begin semantics 789 // This is good enough as long as the first touch event has Begin semantics
790 // and the actual scroll happens on the next vsync. 790 // and the actual scroll happens on the next vsync.
791 if (observing_root_window_) 791 if (observing_root_window_)
792 RequestVSyncUpdate(BEGIN_FRAME); 792 RequestVSyncUpdate(BEGIN_FRAME);
793 793
794 return true; 794 return true;
795 } 795 }
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 if (CompositorImpl::IsInitialized()) { 1455 if (CompositorImpl::IsInitialized()) {
1456 handle.parent_client_id = 1456 handle.parent_client_id =
1457 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); 1457 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId();
1458 } 1458 }
1459 return handle; 1459 return handle;
1460 } 1460 }
1461 1461
1462 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( 1462 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent(
1463 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { 1463 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
1464 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; 1464 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
1465 gesture_provider_.OnTouchEventAck(event_consumed); 1465 gesture_provider_.OnAsyncTouchEventAck(event_consumed);
1466 } 1466 }
1467 1467
1468 void RenderWidgetHostViewAndroid::GestureEventAck( 1468 void RenderWidgetHostViewAndroid::GestureEventAck(
1469 const blink::WebGestureEvent& event, 1469 const blink::WebGestureEvent& event,
1470 InputEventAckState ack_result) { 1470 InputEventAckState ack_result) {
1471 if (overscroll_controller_) 1471 if (overscroll_controller_)
1472 overscroll_controller_->OnGestureEventAck(event, ack_result); 1472 overscroll_controller_->OnGestureEventAck(event, ack_result);
1473 1473
1474 if (content_view_core_) 1474 if (content_view_core_)
1475 content_view_core_->OnGestureEventAck(event, ack_result); 1475 content_view_core_->OnGestureEventAck(event, ack_result);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 results->orientationAngle = display.RotationAsDegree(); 1876 results->orientationAngle = display.RotationAsDegree();
1877 results->orientationType = 1877 results->orientationType =
1878 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1878 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1879 gfx::DeviceDisplayInfo info; 1879 gfx::DeviceDisplayInfo info;
1880 results->depth = info.GetBitsPerPixel(); 1880 results->depth = info.GetBitsPerPixel();
1881 results->depthPerComponent = info.GetBitsPerComponent(); 1881 results->depthPerComponent = info.GetBitsPerComponent();
1882 results->isMonochrome = (results->depthPerComponent == 0); 1882 results->isMonochrome = (results->depthPerComponent == 0);
1883 } 1883 }
1884 1884
1885 } // namespace content 1885 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698