DescriptionNotify the browser when the page lost interest about gamepads
The page visibility logic used in NavigatorGamepad via DeviceEventControllerBase
assumes that we only want to tell the dispatcher that we are uninterested in
events if we have an event listener. This is not perfect for gamepad. If the
page doesn't add event listener for gamepad events it can still poll the data
via navigator.getGamepads() at which point we tell the browser that we need
gamepad data. We also want to tell the browser if we are not interested so that
it can suspend the polling thread.
Long story short, we shouldn't check m_hasEventListener in
pageVisibilityChanged. This CL doesn't change visible behavior thus no tests.
Visibility related tests should be added for gamepad though, I will do that
later.
BUG=386846
R=bajones@chromium.org
TBR=abarth@chromium.org
NOTRY=true
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176618
Patch Set 1 #Patch Set 2 : fixed for relanding #
Messages
Total messages: 12 (0 generated)
|