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

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

Issue 2134063002: Remove DOMWindowLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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
Index: third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
diff --git a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
index c4cd70d46a17a1d34221da80adeb0842dcc5d521..a5b74047443658e8b615745eeb3474d3868bd73d 100644
--- a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
+++ b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
@@ -26,7 +26,6 @@
#include "modules/gamepad/NavigatorGamepad.h"
#include "core/dom/Document.h"
-#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Navigator.h"
#include "core/page/Page.h"
@@ -109,7 +108,6 @@ DEFINE_TRACE(NavigatorGamepad)
Supplement<Navigator>::trace(visitor);
DOMWindowProperty::trace(visitor);
PlatformEventController::trace(visitor);
- DOMWindowLifecycleObserver::trace(visitor);
}
bool NavigatorGamepad::startUpdatingIfAttached()
@@ -168,9 +166,10 @@ void NavigatorGamepad::dispatchOneEvent()
NavigatorGamepad::NavigatorGamepad(LocalFrame* frame)
: DOMWindowProperty(frame)
, PlatformEventController(frame ? frame->page() : 0)
- , DOMWindowLifecycleObserver(frame ? frame->localDOMWindow() : 0)
, m_dispatchOneEventRunner(AsyncMethodRunner<NavigatorGamepad>::create(this, &NavigatorGamepad::dispatchOneEvent))
{
+ if (frame)
+ frame->localDOMWindow()->registerEventListenerObserver(this);
}
NavigatorGamepad::~NavigatorGamepad()

Powered by Google App Engine
This is Rietveld 408576698