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

Unified Diff: Source/modules/device_orientation/DeviceOrientationController.cpp

Issue 256593010: Gracefully support Navigator Gamepad methods in a detached state. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have document supplements keep a reference to their document Created 6 years, 8 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: Source/modules/device_orientation/DeviceOrientationController.cpp
diff --git a/Source/modules/device_orientation/DeviceOrientationController.cpp b/Source/modules/device_orientation/DeviceOrientationController.cpp
index ffbb996cbc40f799649feb99ad3af4b6d8c68582..779b3284abaf28bfd269ab369ff94aecaa97e0b4 100644
--- a/Source/modules/device_orientation/DeviceOrientationController.cpp
+++ b/Source/modules/device_orientation/DeviceOrientationController.cpp
@@ -37,8 +37,9 @@
namespace WebCore {
DeviceOrientationController::DeviceOrientationController(Document& document)
- : DeviceSensorEventController(document)
+ : DeviceSensorEventController(document.page())
, DOMWindowLifecycleObserver(document.domWindow())
+ , m_document(document)
{
}
@@ -100,6 +101,11 @@ bool DeviceOrientationController::isNullEvent(Event* event)
return !orientationEvent->orientation()->canProvideEventData();
}
+Document* DeviceOrientationController::document()
+{
+ return &m_document;
+}
+
void DeviceOrientationController::didAddEventListener(DOMWindow* window, const AtomicString& eventType)
{
if (eventType != EventTypeNames::deviceorientation)
« no previous file with comments | « Source/modules/device_orientation/DeviceOrientationController.h ('k') | Source/modules/gamepad/NavigatorGamepad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698