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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 DeviceMotionEvent(); 61 DeviceMotionEvent();
62 DeviceMotionEvent(const AtomicString& eventType, DeviceMotionData*); 62 DeviceMotionEvent(const AtomicString& eventType, DeviceMotionData*);
63 63
64 RefPtr<DeviceMotionData> m_deviceMotionData; 64 RefPtr<DeviceMotionData> m_deviceMotionData;
65 65
66 RefPtr<DeviceAcceleration> m_acceleration; 66 RefPtr<DeviceAcceleration> m_acceleration;
67 RefPtr<DeviceAcceleration> m_accelerationIncludingGravity; 67 RefPtr<DeviceAcceleration> m_accelerationIncludingGravity;
68 RefPtr<DeviceRotationRate> m_rotationRate; 68 RefPtr<DeviceRotationRate> m_rotationRate;
69 }; 69 };
70 70
71 inline DeviceMotionEvent* toDeviceMotionEvent(Event* event)
72 {
73 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->interfaceName() == EventNa mes::devicemotion);
tkent 2013/10/10 01:51:13 EventNames::devicemotion should be eventNames().in
74 return static_cast<DeviceMotionEvent*>(event);
75 }
76
71 } // namespace WebCore 77 } // namespace WebCore
72 78
73 #endif // DeviceMotionEvent_h 79 #endif // DeviceMotionEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698