class ParticipationTokenInterface
Defined at line 31 of file ../../src/ui/a11y/lib/gesture_manager/arena_v2/participation_token_interface.h
Represents a |GestureRecognizerV2|'s participation in a contest.
Recognizers add themselves to the arena via |GestureArenaV2::Add(GestureRecognizerV2*)|,
and receive a |ParticipationToken| in |OnContestStarted|.
Recognizers receive updates for a gesture as long as they hold their |ParticipationToken|
and have not been defeated. They must release their |ParticipationToken| when they no longer
want events. Recognizers may call |Accept()| to try to claim a win or |Reject()| to be defeated.
Only the first call to |Accept()| or |Reject()| has any effect.
If a |ParticipationToken| is released before |Accept()| or |Reject()|, it automatically rejects.
Contest resolution does not occur until all recognizers have accepted or rejected. When
resolution occurs, the highest priority "accept" is awarded the win. All others are
informed of their loss.
The contest is reset after the winner releases its |ParticipationToken| or if
all recognizers declare defeat. A subsequent interaction will start a new contest and new
|ParticipationToken|s will be issued to all recognizers.
Public Methods
void Accept ()
Try to claim a win in this contest. Resolution does not occur until all recognizers have
accepted or rejected, at which point the corresponding |GestureRecognizerV2| method will be
called.
void Reject ()
Declares defeat in this contest. The recognizer receives a call to |OnDefeat()| before this
returns.
void ~ParticipationTokenInterface ()
Defined at line 33 of file ../../src/ui/a11y/lib/gesture_manager/arena_v2/participation_token_interface.h