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

Unified Diff: Source/modules/gamepad/NavigatorGamepad.cpp

Issue 828983002: Do not (re)start NavigatorGamepad updating once detached. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simply refuse to (re)start updating when detached Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/gamepad/NavigatorGamepad.cpp
diff --git a/Source/modules/gamepad/NavigatorGamepad.cpp b/Source/modules/gamepad/NavigatorGamepad.cpp
index 0846608d4fd11bf2265318aca4aa0dd90448c76c..3cbc3f912c9cc66f9578eac7988de58ebf65c58d 100644
--- a/Source/modules/gamepad/NavigatorGamepad.cpp
+++ b/Source/modules/gamepad/NavigatorGamepad.cpp
@@ -97,7 +97,8 @@ GamepadList* NavigatorGamepad::gamepads()
{
if (!m_gamepads)
m_gamepads = GamepadList::create();
- if (frame() && frame()->domWindow()) {
+ if (frame() && frame()->host()) {
+ // The frame must be attached to start updating.
startUpdating();
sampleGamepads<Gamepad>(m_gamepads.get());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698