| 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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 } | 1679 } |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 if (overscroll_controller_ && | 1682 if (overscroll_controller_ && |
| 1683 blink::WebInputEvent::isGestureEventType(input_event.type) && | 1683 blink::WebInputEvent::isGestureEventType(input_event.type) && |
| 1684 overscroll_controller_->WillHandleGestureEvent( | 1684 overscroll_controller_->WillHandleGestureEvent( |
| 1685 static_cast<const blink::WebGestureEvent&>(input_event))) { | 1685 static_cast<const blink::WebGestureEvent&>(input_event))) { |
| 1686 return INPUT_EVENT_ACK_STATE_CONSUMED; | 1686 return INPUT_EVENT_ACK_STATE_CONSUMED; |
| 1687 } | 1687 } |
| 1688 | 1688 |
| 1689 if (content_view_core_ && | 1689 if (content_view_core_) { |
| 1690 content_view_core_->FilterInputEvent(input_event)) | 1690 InputEventAckState ack_result = |
| 1691 return INPUT_EVENT_ACK_STATE_CONSUMED; | 1691 content_view_core_->FilterInputEvent(input_event); |
| 1692 if (ack_result != INPUT_EVENT_ACK_STATE_NOT_CONSUMED) |
| 1693 return ack_result; |
| 1694 } |
| 1692 | 1695 |
| 1693 if (!host_) | 1696 if (!host_) |
| 1694 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1697 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 1695 | 1698 |
| 1696 if (input_event.type == blink::WebInputEvent::GestureTapDown || | 1699 if (input_event.type == blink::WebInputEvent::GestureTapDown || |
| 1697 input_event.type == blink::WebInputEvent::TouchStart) { | 1700 input_event.type == blink::WebInputEvent::TouchStart) { |
| 1698 GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance(); | 1701 GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance(); |
| 1699 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance(); | 1702 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance(); |
| 1700 if (shim && gpu_data && accelerated_surface_route_id_ && | 1703 if (shim && gpu_data && accelerated_surface_route_id_ && |
| 1701 gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING)) | 1704 gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING)) |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 results->orientationAngle = display.RotationAsDegree(); | 2113 results->orientationAngle = display.RotationAsDegree(); |
| 2111 results->orientationType = | 2114 results->orientationType = |
| 2112 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2115 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2113 gfx::DeviceDisplayInfo info; | 2116 gfx::DeviceDisplayInfo info; |
| 2114 results->depth = info.GetBitsPerPixel(); | 2117 results->depth = info.GetBitsPerPixel(); |
| 2115 results->depthPerComponent = info.GetBitsPerComponent(); | 2118 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2116 results->isMonochrome = (results->depthPerComponent == 0); | 2119 results->isMonochrome = (results->depthPerComponent == 0); |
| 2117 } | 2120 } |
| 2118 | 2121 |
| 2119 } // namespace content | 2122 } // namespace content |
| OLD | NEW |