Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Issue 332183009: Notify the browser when the page lost interest about gamepads (Closed)

Created:
6 years, 6 months ago by kbalazs
Modified:
6 years, 6 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Notify 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. For gamepad that is not perfect where the the page can ask the gamepad state anytime via navigator.getGamepads(). This CL doesn't change visible behavior thus no tests. The enhancement is that now we properly tell the browser that we are not intereseted in gamepads while we are hidden so it can suspend the polling thread. Visibility related tests should be added for gamepad though, I will do that later. This is a fixed reland of r176618 BUG=386846 R=abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176789

Patch Set 1 #

Total comments: 1

Patch Set 2 : gamepads||webkitGamepads #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -1 line) Patch
M Source/core/frame/DeviceEventControllerBase.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/gamepad/NavigatorGamepad.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/gamepad/NavigatorGamepad.cpp View 1 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
kbalazs
This was reverted because it broke content_browsertests. The problem was that by simply omitting to ...
6 years, 6 months ago (2014-06-20 23:25:53 UTC) #1
abarth-chromium
https://codereview.chromium.org/332183009/diff/1/Source/modules/gamepad/NavigatorGamepad.cpp File Source/modules/gamepad/NavigatorGamepad.cpp (right): https://codereview.chromium.org/332183009/diff/1/Source/modules/gamepad/NavigatorGamepad.cpp#newcode237 Source/modules/gamepad/NavigatorGamepad.cpp:237: if (page()->visibilityState() == PageVisibilityStateVisible && (m_hasEventListener || m_wasPolled)) Instead ...
6 years, 6 months ago (2014-06-21 05:40:17 UTC) #2
kbalazs
On 2014/06/21 05:40:17, abarth wrote: > https://codereview.chromium.org/332183009/diff/1/Source/modules/gamepad/NavigatorGamepad.cpp > File Source/modules/gamepad/NavigatorGamepad.cpp (right): > > https://codereview.chromium.org/332183009/diff/1/Source/modules/gamepad/NavigatorGamepad.cpp#newcode237 > ...
6 years, 6 months ago (2014-06-23 19:16:37 UTC) #3
abarth-chromium
lgtm
6 years, 6 months ago (2014-06-23 19:59:25 UTC) #4
kbalazs
The CQ bit was checked by b.kelemen@samsung.com
6 years, 6 months ago (2014-06-23 21:22:01 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/332183009/20001
6 years, 6 months ago (2014-06-23 21:22:15 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 6 months ago (2014-06-23 22:12:02 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-23 22:50:01 UTC) #8
Message was sent while issue was closed.
Change committed as 176789

Powered by Google App Engine
This is Rietveld 408576698