| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/input/buffered_input_router.h" | 5 #include "content/browser/renderer_host/input/buffered_input_router.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "content/browser/renderer_host/input/browser_input_event.h" | 8 #include "content/browser/renderer_host/input/browser_input_event.h" |
| 9 #include "content/browser/renderer_host/input/input_ack_handler.h" | 9 #include "content/browser/renderer_host/input/input_ack_handler.h" |
| 10 #include "content/browser/renderer_host/input/input_queue.h" | 10 #include "content/browser/renderer_host/input/input_queue.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 bool BufferedInputRouter::ShouldForwardTouchEvent() const { | 201 bool BufferedInputRouter::ShouldForwardTouchEvent() const { |
| 202 return has_touch_handler_ && queued_touch_count_ > 0; | 202 return has_touch_handler_ && queued_touch_count_ > 0; |
| 203 } | 203 } |
| 204 | 204 |
| 205 bool BufferedInputRouter::ShouldForwardGestureEvent( | 205 bool BufferedInputRouter::ShouldForwardGestureEvent( |
| 206 const GestureEventWithLatencyInfo& touch_event) const { | 206 const GestureEventWithLatencyInfo& touch_event) const { |
| 207 return true; | 207 return true; |
| 208 } | 208 } |
| 209 | 209 |
| 210 bool BufferedInputRouter::HasQueuedGestureEvents() const { | |
| 211 return queued_gesture_count_ > 0; | |
| 212 } | |
| 213 | |
| 214 void BufferedInputRouter::OnWebInputEventAck( | 210 void BufferedInputRouter::OnWebInputEventAck( |
| 215 int64 event_id, | 211 int64 event_id, |
| 216 const WebKit::WebInputEvent& web_event, | 212 const WebKit::WebInputEvent& web_event, |
| 217 const ui::LatencyInfo& latency_info, | 213 const ui::LatencyInfo& latency_info, |
| 218 InputEventAckState acked_result, | 214 InputEventAckState acked_result, |
| 219 bool ack_from_input_queue) { | 215 bool ack_from_input_queue) { |
| 220 if (WebInputEvent::isKeyboardEventType(web_event.type)) { | 216 if (WebInputEvent::isKeyboardEventType(web_event.type)) { |
| 221 if (ack_from_input_queue) { | 217 if (ack_from_input_queue) { |
| 222 KeyMap::iterator key_it = queued_key_map_.find(event_id); | 218 KeyMap::iterator key_it = queued_key_map_.find(event_id); |
| 223 DCHECK(key_it != queued_key_map_.end()); | 219 DCHECK(key_it != queued_key_map_.end()); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 default: | 333 default: |
| 338 break; | 334 break; |
| 339 }; | 335 }; |
| 340 | 336 |
| 341 return false; | 337 return false; |
| 342 } | 338 } |
| 343 | 339 |
| 344 int64 BufferedInputRouter::NextInputID() { return next_input_id_++; } | 340 int64 BufferedInputRouter::NextInputID() { return next_input_id_++; } |
| 345 | 341 |
| 346 } // namespace content | 342 } // namespace content |
| OLD | NEW |