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

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

Issue 26434002: Cleanup: Add more conversion helpers for usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to ToT. Patch for landing. Created 7 years, 2 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/DeviceMotionEvent.h
diff --git a/Source/modules/device_orientation/DeviceMotionEvent.h b/Source/modules/device_orientation/DeviceMotionEvent.h
index bf1824cc5b183e7306bea41fd5d589959345ff37..9c2eb810233d6ea053ff48abb1fa59b92ae2da12 100644
--- a/Source/modules/device_orientation/DeviceMotionEvent.h
+++ b/Source/modules/device_orientation/DeviceMotionEvent.h
@@ -68,6 +68,12 @@ private:
RefPtr<DeviceRotationRate> m_rotationRate;
};
+inline DeviceMotionEvent* toDeviceMotionEvent(Event* event)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!event || event->interfaceName() == EventNames::devicemotion);
tkent 2013/10/10 01:51:13 EventNames::devicemotion should be eventNames().in
+ return static_cast<DeviceMotionEvent*>(event);
+}
+
} // namespace WebCore
#endif // DeviceMotionEvent_h

Powered by Google App Engine
This is Rietveld 408576698