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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 } | 1575 } |
1576 } | 1576 } |
1577 | 1577 |
1578 if (overscroll_controller_ && | 1578 if (overscroll_controller_ && |
1579 blink::WebInputEvent::isGestureEventType(input_event.type) && | 1579 blink::WebInputEvent::isGestureEventType(input_event.type) && |
1580 overscroll_controller_->WillHandleGestureEvent( | 1580 overscroll_controller_->WillHandleGestureEvent( |
1581 static_cast<const blink::WebGestureEvent&>(input_event))) { | 1581 static_cast<const blink::WebGestureEvent&>(input_event))) { |
1582 return INPUT_EVENT_ACK_STATE_CONSUMED; | 1582 return INPUT_EVENT_ACK_STATE_CONSUMED; |
1583 } | 1583 } |
1584 | 1584 |
1585 if (content_view_core_) { | 1585 if (content_view_core_ && content_view_core_->FilterInputEvent(input_event)) |
1586 InputEventAckState ack_result = | 1586 return INPUT_EVENT_ACK_STATE_CONSUMED; |
1587 content_view_core_->FilterInputEvent(input_event); | |
1588 if (ack_result != INPUT_EVENT_ACK_STATE_NOT_CONSUMED) | |
1589 return ack_result; | |
1590 } | |
1591 | 1587 |
1592 if (!host_) | 1588 if (!host_) |
1593 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1589 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
1594 | 1590 |
1595 if (input_event.type == blink::WebInputEvent::GestureTapDown || | 1591 if (input_event.type == blink::WebInputEvent::GestureTapDown || |
1596 input_event.type == blink::WebInputEvent::TouchStart) { | 1592 input_event.type == blink::WebInputEvent::TouchStart) { |
1597 GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance(); | 1593 GpuDataManagerImpl* gpu_data = GpuDataManagerImpl::GetInstance(); |
1598 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance(); | 1594 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance(); |
1599 if (shim && gpu_data && accelerated_surface_route_id_ && | 1595 if (shim && gpu_data && accelerated_surface_route_id_ && |
1600 gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING)) | 1596 gpu_data->IsDriverBugWorkaroundActive(gpu::WAKE_UP_GPU_BEFORE_DRAWING)) |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 results->orientationAngle = display.RotationAsDegree(); | 1967 results->orientationAngle = display.RotationAsDegree(); |
1972 results->orientationType = | 1968 results->orientationType = |
1973 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1969 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1974 gfx::DeviceDisplayInfo info; | 1970 gfx::DeviceDisplayInfo info; |
1975 results->depth = info.GetBitsPerPixel(); | 1971 results->depth = info.GetBitsPerPixel(); |
1976 results->depthPerComponent = info.GetBitsPerComponent(); | 1972 results->depthPerComponent = info.GetBitsPerComponent(); |
1977 results->isMonochrome = (results->depthPerComponent == 0); | 1973 results->isMonochrome = (results->depthPerComponent == 0); |
1978 } | 1974 } |
1979 | 1975 |
1980 } // namespace content | 1976 } // namespace content |
OLD | NEW |