| 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 gesture_provider_.GetCurrentDownEvent(); | 817 gesture_provider_.GetCurrentDownEvent(); |
| 818 if (current_down_event) { | 818 if (current_down_event) { |
| 819 scoped_ptr<ui::MotionEvent> cancel_event = current_down_event->Cancel(); | 819 scoped_ptr<ui::MotionEvent> cancel_event = current_down_event->Cancel(); |
| 820 OnTouchEvent(*cancel_event); | 820 OnTouchEvent(*cancel_event); |
| 821 } | 821 } |
| 822 | 822 |
| 823 // A hard reset ensures prevention of any timer-based events. | 823 // A hard reset ensures prevention of any timer-based events. |
| 824 gesture_provider_.ResetDetection(); | 824 gesture_provider_.ResetDetection(); |
| 825 } | 825 } |
| 826 | 826 |
| 827 void RenderWidgetHostViewAndroid::OnDidNavigateMainFrameToNewPage() { |
| 828 ResetGestureDetection(); |
| 829 } |
| 830 |
| 827 void RenderWidgetHostViewAndroid::SetDoubleTapSupportEnabled(bool enabled) { | 831 void RenderWidgetHostViewAndroid::SetDoubleTapSupportEnabled(bool enabled) { |
| 828 gesture_provider_.SetDoubleTapSupportForPlatformEnabled(enabled); | 832 gesture_provider_.SetDoubleTapSupportForPlatformEnabled(enabled); |
| 829 } | 833 } |
| 830 | 834 |
| 831 void RenderWidgetHostViewAndroid::SetMultiTouchZoomSupportEnabled( | 835 void RenderWidgetHostViewAndroid::SetMultiTouchZoomSupportEnabled( |
| 832 bool enabled) { | 836 bool enabled) { |
| 833 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); | 837 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); |
| 834 } | 838 } |
| 835 | 839 |
| 836 void RenderWidgetHostViewAndroid::ImeCancelComposition() { | 840 void RenderWidgetHostViewAndroid::ImeCancelComposition() { |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 results->orientationAngle = display.RotationAsDegree(); | 1916 results->orientationAngle = display.RotationAsDegree(); |
| 1913 results->orientationType = | 1917 results->orientationType = |
| 1914 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1918 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1915 gfx::DeviceDisplayInfo info; | 1919 gfx::DeviceDisplayInfo info; |
| 1916 results->depth = info.GetBitsPerPixel(); | 1920 results->depth = info.GetBitsPerPixel(); |
| 1917 results->depthPerComponent = info.GetBitsPerComponent(); | 1921 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1918 results->isMonochrome = (results->depthPerComponent == 0); | 1922 results->isMonochrome = (results->depthPerComponent == 0); |
| 1919 } | 1923 } |
| 1920 | 1924 |
| 1921 } // namespace content | 1925 } // namespace content |
| OLD | NEW |