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

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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 786
787 if (!gesture_provider_.OnTouchEvent(event)) 787 if (!gesture_provider_.OnTouchEvent(event))
788 return false; 788 return false;
789 789
790 if (host_->ShouldForwardTouchEvent()) { 790 if (host_->ShouldForwardTouchEvent()) {
791 blink::WebTouchEvent web_event = CreateWebTouchEventFromMotionEvent(event); 791 blink::WebTouchEvent web_event = CreateWebTouchEventFromMotionEvent(event);
792 host_->ForwardTouchEventWithLatencyInfo(web_event, 792 host_->ForwardTouchEventWithLatencyInfo(web_event,
793 CreateLatencyInfo(web_event)); 793 CreateLatencyInfo(web_event));
794 } else { 794 } else {
795 const bool event_consumed = false; 795 const bool event_consumed = false;
796 gesture_provider_.OnTouchEventAck(event_consumed); 796 gesture_provider_.OnAsyncTouchEventAck(event_consumed);
797 } 797 }
798 798
799 // Send a proactive BeginFrame on the next vsync to reduce latency. 799 // Send a proactive BeginFrame on the next vsync to reduce latency.
800 // This is good enough as long as the first touch event has Begin semantics 800 // This is good enough as long as the first touch event has Begin semantics
801 // and the actual scroll happens on the next vsync. 801 // and the actual scroll happens on the next vsync.
802 if (observing_root_window_) 802 if (observing_root_window_)
803 RequestVSyncUpdate(BEGIN_FRAME); 803 RequestVSyncUpdate(BEGIN_FRAME);
804 804
805 return true; 805 return true;
806 } 806 }
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 if (using_browser_compositor_) { 1470 if (using_browser_compositor_) {
1471 handle.parent_client_id = 1471 handle.parent_client_id =
1472 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); 1472 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId();
1473 } 1473 }
1474 return handle; 1474 return handle;
1475 } 1475 }
1476 1476
1477 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( 1477 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent(
1478 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { 1478 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
1479 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; 1479 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
1480 gesture_provider_.OnTouchEventAck(event_consumed); 1480 gesture_provider_.OnAsyncTouchEventAck(event_consumed);
1481 } 1481 }
1482 1482
1483 void RenderWidgetHostViewAndroid::GestureEventAck( 1483 void RenderWidgetHostViewAndroid::GestureEventAck(
1484 const blink::WebGestureEvent& event, 1484 const blink::WebGestureEvent& event,
1485 InputEventAckState ack_result) { 1485 InputEventAckState ack_result) {
1486 if (overscroll_controller_) 1486 if (overscroll_controller_)
1487 overscroll_controller_->OnGestureEventAck(event, ack_result); 1487 overscroll_controller_->OnGestureEventAck(event, ack_result);
1488 1488
1489 if (content_view_core_) 1489 if (content_view_core_)
1490 content_view_core_->OnGestureEventAck(event, ack_result); 1490 content_view_core_->OnGestureEventAck(event, ack_result);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 results->orientationAngle = display.RotationAsDegree(); 1891 results->orientationAngle = display.RotationAsDegree();
1892 results->orientationType = 1892 results->orientationType =
1893 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1893 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1894 gfx::DeviceDisplayInfo info; 1894 gfx::DeviceDisplayInfo info;
1895 results->depth = info.GetBitsPerPixel(); 1895 results->depth = info.GetBitsPerPixel();
1896 results->depthPerComponent = info.GetBitsPerComponent(); 1896 results->depthPerComponent = info.GetBitsPerComponent();
1897 results->isMonochrome = (results->depthPerComponent == 0); 1897 results->isMonochrome = (results->depthPerComponent == 0);
1898 } 1898 }
1899 1899
1900 } // namespace content 1900 } // 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