Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 720 if (stylus_text_selector_.OnTouchEvent(event)) { | 720 if (stylus_text_selector_.OnTouchEvent(event)) { |
| 721 RequestDisallowInterceptTouchEvent(); | 721 RequestDisallowInterceptTouchEvent(); |
| 722 return true; | 722 return true; |
| 723 } | 723 } |
| 724 | 724 |
| 725 ui::FilteredGestureProvider::TouchHandlingResult result = | 725 ui::FilteredGestureProvider::TouchHandlingResult result = |
| 726 gesture_provider_.OnTouchEvent(event); | 726 gesture_provider_.OnTouchEvent(event); |
| 727 if (!result.succeeded) | 727 if (!result.succeeded) |
| 728 return false; | 728 return false; |
| 729 | 729 |
| 730 blink::WebTouchEvent web_event = | 730 LOG(ERROR) << "Touch event consumed"; |
|
David Trainor- moved to gerrit
2015/11/02 16:55:30
fix meh.
| |
| 731 ui::CreateWebTouchEventFromMotionEvent(event, result.did_generate_scroll); | 731 //blink::WebTouchEvent web_event = |
| 732 host_->ForwardTouchEventWithLatencyInfo(web_event, ui::LatencyInfo()); | 732 // ui::CreateWebTouchEventFromMotionEvent(event, result.did_generate_scroll ); |
| 733 //host_->ForwardTouchEventWithLatencyInfo(web_event, ui::LatencyInfo()); | |
| 733 | 734 |
| 734 // Send a proactive BeginFrame for this vsync to reduce scroll latency for | 735 // Send a proactive BeginFrame for this vsync to reduce scroll latency for |
| 735 // scroll-inducing touch events. Note that Android's Choreographer ensures | 736 // scroll-inducing touch events. Note that Android's Choreographer ensures |
| 736 // that BeginFrame requests made during ACTION_MOVE dispatch will be honored | 737 // that BeginFrame requests made during ACTION_MOVE dispatch will be honored |
| 737 // in the same vsync phase. | 738 // in the same vsync phase. |
| 738 if (observing_root_window_ && result.did_generate_scroll) | 739 if (observing_root_window_ && result.did_generate_scroll) |
| 739 RequestVSyncUpdate(BEGIN_FRAME); | 740 RequestVSyncUpdate(BEGIN_FRAME); |
| 740 | 741 |
| 741 return true; | 742 return true; |
| 742 } | 743 } |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1827 } | 1828 } |
| 1828 | 1829 |
| 1829 void RenderWidgetHostViewAndroid::OnGestureEvent( | 1830 void RenderWidgetHostViewAndroid::OnGestureEvent( |
| 1830 const ui::GestureEventData& gesture) { | 1831 const ui::GestureEventData& gesture) { |
| 1831 blink::WebGestureEvent web_gesture = | 1832 blink::WebGestureEvent web_gesture = |
| 1832 ui::CreateWebGestureEventFromGestureEventData(gesture); | 1833 ui::CreateWebGestureEventFromGestureEventData(gesture); |
| 1833 // TODO(jdduke): Remove this workaround after Android fixes UiAutomator to | 1834 // TODO(jdduke): Remove this workaround after Android fixes UiAutomator to |
| 1834 // stop providing shift meta values to synthetic MotionEvents. This prevents | 1835 // stop providing shift meta values to synthetic MotionEvents. This prevents |
| 1835 // unintended shift+click interpretation of all accessibility clicks. | 1836 // unintended shift+click interpretation of all accessibility clicks. |
| 1836 // See crbug.com/443247. | 1837 // See crbug.com/443247. |
| 1838 LOG(ERROR) << "OnGestureEvent"; | |
|
David Trainor- moved to gerrit
2015/11/02 16:55:30
meh too!
| |
| 1837 if (web_gesture.type == blink::WebInputEvent::GestureTap && | 1839 if (web_gesture.type == blink::WebInputEvent::GestureTap && |
| 1838 web_gesture.modifiers == blink::WebInputEvent::ShiftKey) { | 1840 web_gesture.modifiers == blink::WebInputEvent::ShiftKey) { |
| 1839 web_gesture.modifiers = 0; | 1841 web_gesture.modifiers = 0; |
| 1840 } | 1842 } |
| 1841 SendGestureEvent(web_gesture); | 1843 SendGestureEvent(web_gesture); |
| 1842 } | 1844 } |
| 1843 | 1845 |
| 1844 void RenderWidgetHostViewAndroid::OnCompositingDidCommit() { | 1846 void RenderWidgetHostViewAndroid::OnCompositingDidCommit() { |
| 1845 RunAckCallbacks(cc::SurfaceDrawStatus::DRAWN); | 1847 RunAckCallbacks(cc::SurfaceDrawStatus::DRAWN); |
| 1846 } | 1848 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2044 results->orientationAngle = display.RotationAsDegree(); | 2046 results->orientationAngle = display.RotationAsDegree(); |
| 2045 results->orientationType = | 2047 results->orientationType = |
| 2046 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2048 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2047 gfx::DeviceDisplayInfo info; | 2049 gfx::DeviceDisplayInfo info; |
| 2048 results->depth = info.GetBitsPerPixel(); | 2050 results->depth = info.GetBitsPerPixel(); |
| 2049 results->depthPerComponent = info.GetBitsPerComponent(); | 2051 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2050 results->isMonochrome = (results->depthPerComponent == 0); | 2052 results->isMonochrome = (results->depthPerComponent == 0); |
| 2051 } | 2053 } |
| 2052 | 2054 |
| 2053 } // namespace content | 2055 } // namespace content |
| OLD | NEW |