void InputQueue::ContentReceivedInputBlock(uint64_t aInputBlockId, bool aPreventDefault) { APZThreadUtils::AssertOnControllerThread(); INPQ_LOG("got a content response; block=%" PRIu64 "\n", aInputBlockId); bool success = false; CancelableBlockState* block = FindBlockForId(aInputBlockId, nullptr); if (block) { success = block->SetContentResponse(aPreventDefault); block->RecordContentResponseTime(); } if (success) { ProcessQueue(); } }
void InputQueue::SetAllowedTouchBehavior(uint64_t aInputBlockId, const nsTArray<TouchBehaviorFlags>& aBehaviors) { APZThreadUtils::AssertOnControllerThread(); INPQ_LOG("got allowed touch behaviours; block=%" PRIu64 "\n", aInputBlockId); bool success = false; CancelableBlockState* block = FindBlockForId(aInputBlockId, nullptr); if (block && block->AsTouchBlock()) { success = block->AsTouchBlock()->SetAllowedTouchBehaviors(aBehaviors); block->RecordContentResponseTime(); } else if (block) { NS_WARNING("input block is not a touch block"); } if (success) { ProcessQueue(); } }
void InputQueue::SetConfirmedTargetApzc(uint64_t aInputBlockId, const RefPtr<AsyncPanZoomController>& aTargetApzc) { APZThreadUtils::AssertOnControllerThread(); INPQ_LOG("got a target apzc; block=%" PRIu64 " guid=%s\n", aInputBlockId, aTargetApzc ? Stringify(aTargetApzc->GetGuid()).c_str() : ""); bool success = false; InputData* firstInput = nullptr; CancelableBlockState* block = FindBlockForId(aInputBlockId, &firstInput); if (block) { success = block->SetConfirmedTargetApzc(aTargetApzc, InputBlockState::TargetConfirmationState::eConfirmed, firstInput); block->RecordContentResponseTime(); } if (success) { ProcessQueue(); } }