| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/renderer/input/render_widget_input_handler.h" | 5 #include "content/renderer/input/render_widget_input_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 using blink::WebFloatPoint; | 36 using blink::WebFloatPoint; |
| 37 using blink::WebFloatSize; | 37 using blink::WebFloatSize; |
| 38 using blink::WebGestureEvent; | 38 using blink::WebGestureEvent; |
| 39 using blink::WebInputEvent; | 39 using blink::WebInputEvent; |
| 40 using blink::WebInputEventResult; | 40 using blink::WebInputEventResult; |
| 41 using blink::WebKeyboardEvent; | 41 using blink::WebKeyboardEvent; |
| 42 using blink::WebMouseEvent; | 42 using blink::WebMouseEvent; |
| 43 using blink::WebMouseWheelEvent; | 43 using blink::WebMouseWheelEvent; |
| 44 using blink::WebTouchEvent; | 44 using blink::WebTouchEvent; |
| 45 using blink::WebTouchPoint; | 45 using blink::WebTouchPoint; |
| 46 using ui::DidOverscrollParams; |
| 46 | 47 |
| 47 namespace content { | 48 namespace content { |
| 48 | 49 |
| 49 namespace { | 50 namespace { |
| 50 | 51 |
| 51 // TODO(brianderson): Replace the hard-coded threshold with a fraction of | 52 // TODO(brianderson): Replace the hard-coded threshold with a fraction of |
| 52 // the BeginMainFrame interval. | 53 // the BeginMainFrame interval. |
| 53 // 4166us will allow 1/4 of a 60Hz interval or 1/2 of a 120Hz interval to | 54 // 4166us will allow 1/4 of a 60Hz interval or 1/2 of a 120Hz interval to |
| 54 // be spent in input hanlders before input starts getting throttled. | 55 // be spent in input hanlders before input starts getting throttled. |
| 55 const int kInputHandlingTimeThrottlingThresholdMicroseconds = 4166; | 56 const int kInputHandlingTimeThrottlingThresholdMicroseconds = 4166; |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 if (pending_input_event_ack_) { | 555 if (pending_input_event_ack_) { |
| 555 TRACE_EVENT_ASYNC_END0("input", | 556 TRACE_EVENT_ASYNC_END0("input", |
| 556 "RenderWidgetInputHandler::ThrottledInputEventAck", | 557 "RenderWidgetInputHandler::ThrottledInputEventAck", |
| 557 pending_input_event_ack_.get()); | 558 pending_input_event_ack_.get()); |
| 558 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); | 559 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); |
| 559 } | 560 } |
| 560 total_input_handling_time_this_frame_ = base::TimeDelta(); | 561 total_input_handling_time_this_frame_ = base::TimeDelta(); |
| 561 } | 562 } |
| 562 | 563 |
| 563 } // namespace content | 564 } // namespace content |
| OLD | NEW |