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

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

Issue 209333008: [DevTools] Support device orientation override on device with sensors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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.h
diff --git a/Source/modules/device_orientation/DeviceOrientationController.h b/Source/modules/device_orientation/DeviceOrientationController.h
index b12bf6f2521dd83bc791877b849921ae18eee67e..39f85b94a9a115ff45690e7ab296ac663bef5191 100644
--- a/Source/modules/device_orientation/DeviceOrientationController.h
+++ b/Source/modules/device_orientation/DeviceOrientationController.h
@@ -45,6 +45,8 @@ public:
static DeviceOrientationController& from(Document&);
void didChangeDeviceOrientation(WebCore::DeviceOrientationData*);
+ void setOverride(WebCore::DeviceOrientationData*);
+ void clearOverride();
// Inherited from DOMWindowLifecycleObserver
virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE;
@@ -56,9 +58,13 @@ private:
virtual void registerWithDispatcher() OVERRIDE;
virtual void unregisterWithDispatcher() OVERRIDE;
+ WebCore::DeviceOrientationData* lastData();
virtual bool hasLastData() OVERRIDE;
virtual PassRefPtr<Event> getLastEvent() OVERRIDE;
virtual bool isNullEvent(Event*) OVERRIDE;
+
+ RefPtrWillBeMember<WebCore::DeviceOrientationData> m_lastOrientation;
timvolodine 2014/03/25 15:06:33 I don't really see why m_lastOrientation is needed
dgozman 2014/03/25 17:50:30 You are right. I thought we should keep the last d
+ RefPtrWillBeMember<WebCore::DeviceOrientationData> m_override;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698