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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1783 const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info) { | 1783 const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info) { |
1784 // Don't ignore touch cancel events, since they may be sent while input | 1784 // Don't ignore touch cancel events, since they may be sent while input |
1785 // events are being ignored in order to keep the renderer from getting | 1785 // events are being ignored in order to keep the renderer from getting |
1786 // confused about how many touches are active. | 1786 // confused about how many touches are active. |
1787 if (IgnoreInputEvents() && event.type != WebInputEvent::TouchCancel) | 1787 if (IgnoreInputEvents() && event.type != WebInputEvent::TouchCancel) |
1788 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 1788 return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
1789 | 1789 |
1790 if (!process_->HasConnection()) | 1790 if (!process_->HasConnection()) |
1791 return INPUT_EVENT_ACK_STATE_UNKNOWN; | 1791 return INPUT_EVENT_ACK_STATE_UNKNOWN; |
1792 | 1792 |
1793 if (event.type == WebInputEvent::MouseDown) | 1793 if (event.type == WebInputEvent::MouseDown || |
| 1794 event.type == WebInputEvent::GestureTapDown) { |
1794 OnUserGesture(); | 1795 OnUserGesture(); |
| 1796 } |
1795 | 1797 |
1796 return view_ ? view_->FilterInputEvent(event) | 1798 return view_ ? view_->FilterInputEvent(event) |
1797 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 1799 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
1798 } | 1800 } |
1799 | 1801 |
1800 void RenderWidgetHostImpl::IncrementInFlightEventCount() { | 1802 void RenderWidgetHostImpl::IncrementInFlightEventCount() { |
1801 increment_in_flight_event_count(); | 1803 increment_in_flight_event_count(); |
1802 if (!is_hidden_) | 1804 if (!is_hidden_) |
1803 StartHangMonitorTimeout(hung_renderer_delay_); | 1805 StartHangMonitorTimeout(hung_renderer_delay_); |
1804 } | 1806 } |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 } | 2128 } |
2127 #endif | 2129 #endif |
2128 | 2130 |
2129 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2131 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
2130 if (view_) | 2132 if (view_) |
2131 return view_->PreferredReadbackFormat(); | 2133 return view_->PreferredReadbackFormat(); |
2132 return kN32_SkColorType; | 2134 return kN32_SkColorType; |
2133 } | 2135 } |
2134 | 2136 |
2135 } // namespace content | 2137 } // namespace content |
OLD | NEW |