| 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/legacy_touch_event_queue.h" | 5 #include "content/browser/renderer_host/input/legacy_touch_event_queue.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 } | 425 } |
| 426 | 426 |
| 427 bool LegacyTouchEventQueue::IsAckTimeoutEnabled() const { | 427 bool LegacyTouchEventQueue::IsAckTimeoutEnabled() const { |
| 428 return timeout_handler_ && timeout_handler_->IsEnabled(); | 428 return timeout_handler_ && timeout_handler_->IsEnabled(); |
| 429 } | 429 } |
| 430 | 430 |
| 431 bool LegacyTouchEventQueue::Empty() const { | 431 bool LegacyTouchEventQueue::Empty() const { |
| 432 return touch_queue_.empty(); | 432 return touch_queue_.empty(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 bool LegacyTouchEventQueue::SendTouchEventsAsync() const { |
| 436 return send_touch_events_async_; |
| 437 } |
| 438 |
| 435 bool LegacyTouchEventQueue::HasPendingAsyncTouchMoveForTesting() const { | 439 bool LegacyTouchEventQueue::HasPendingAsyncTouchMoveForTesting() const { |
| 436 return !!pending_async_touchmove_; | 440 return !!pending_async_touchmove_; |
| 437 } | 441 } |
| 438 | 442 |
| 439 bool LegacyTouchEventQueue::IsTimeoutRunningForTesting() const { | 443 bool LegacyTouchEventQueue::IsTimeoutRunningForTesting() const { |
| 440 return timeout_handler_ && timeout_handler_->IsTimeoutTimerRunning(); | 444 return timeout_handler_ && timeout_handler_->IsTimeoutTimerRunning(); |
| 441 } | 445 } |
| 442 | 446 |
| 443 const TouchEventWithLatencyInfo& | 447 const TouchEventWithLatencyInfo& |
| 444 LegacyTouchEventQueue::GetLatestEventForTesting() const { | 448 LegacyTouchEventQueue::GetLatestEventForTesting() const { |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) | 647 if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) |
| 644 send_touch_events_async_ = false; | 648 send_touch_events_async_ = false; |
| 645 has_handler_for_current_sequence_ |= | 649 has_handler_for_current_sequence_ |= |
| 646 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 650 ack_result != INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
| 647 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { | 651 } else if (WebTouchEventTraits::IsTouchSequenceEnd(event)) { |
| 648 has_handler_for_current_sequence_ = false; | 652 has_handler_for_current_sequence_ = false; |
| 649 } | 653 } |
| 650 } | 654 } |
| 651 | 655 |
| 652 } // namespace content | 656 } // namespace content |
| OLD | NEW |