DescriptionGamepad: don't notify about connected pads twice
Currently the first time we observe user gesture we call
GamepadConsumer::OnGamepadConnected once because of the gesture and once because of the
state change of the pad. This CL fixes that by reordering the gesture check and the
state tests in GamepadProvider the state change will be ignored by GamepadService
because did_observe_user_gesture is still false for the consumer.
Also it seems like I forget to set gesture_callback_pending_ to true when appropriate
in my former CL's, fixed it.
Added unit test for connections and made some refactoring related to unittests.
BUG=344556
R=bajones@chromium.org,scottmg@chromium.org
TBR=dmichael@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281098
Patch Set 1 #Patch Set 2 : lol, gesture_callback_pending_ was still at the wrong place #Patch Set 3 : c++11 fix #Patch Set 4 : more build fix (kNumberOfGamepads) #Messages
Total messages: 18 (0 generated)
|