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

Unified Diff: Source/modules/device_orientation/DeviceOrientationEvent.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/DeviceOrientationEvent.h
diff --git a/Source/modules/device_orientation/DeviceOrientationEvent.h b/Source/modules/device_orientation/DeviceOrientationEvent.h
index 6d27e42803917b4899ce689794bb5910dd3aa636..bec04107393a626afcef9046f13190787f8bf34a 100644
--- a/Source/modules/device_orientation/DeviceOrientationEvent.h
+++ b/Source/modules/device_orientation/DeviceOrientationEvent.h
@@ -62,6 +62,12 @@ private:
RefPtr<DeviceOrientationData> m_orientation;
};
+inline DeviceOrientationEvent* toDeviceOrientationEvent(Event* event)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!event || event->interfaceName() == EventNames::deviceorientation);
tkent 2013/10/10 01:51:13 EventNames::deviceorientation should be eventNames
+ return static_cast<DeviceOrientationEvent*>(event);
+}
+
} // namespace WebCore
#endif // DeviceOrientationEvent_h

Powered by Google App Engine
This is Rietveld 408576698