| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 return new DeviceMotionEvent(eventType, deviceMotionData); | 51 return new DeviceMotionEvent(eventType, deviceMotionData); |
| 52 } | 52 } |
| 53 | 53 |
| 54 DeviceMotionData* getDeviceMotionData() const { | 54 DeviceMotionData* getDeviceMotionData() const { |
| 55 return m_deviceMotionData.get(); | 55 return m_deviceMotionData.get(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 DeviceAcceleration* acceleration(); | 58 DeviceAcceleration* acceleration(); |
| 59 DeviceAcceleration* accelerationIncludingGravity(); | 59 DeviceAcceleration* accelerationIncludingGravity(); |
| 60 DeviceRotationRate* rotationRate(); | 60 DeviceRotationRate* rotationRate(); |
| 61 double interval(bool& isNull) const; | 61 double interval() const; |
| 62 | 62 |
| 63 const AtomicString& interfaceName() const override; | 63 const AtomicString& interfaceName() const override; |
| 64 | 64 |
| 65 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 DeviceMotionEvent(); | 68 DeviceMotionEvent(); |
| 69 DeviceMotionEvent(const AtomicString&, const DeviceMotionEventInit&); | 69 DeviceMotionEvent(const AtomicString&, const DeviceMotionEventInit&); |
| 70 DeviceMotionEvent(const AtomicString& eventType, DeviceMotionData*); | 70 DeviceMotionEvent(const AtomicString& eventType, DeviceMotionData*); |
| 71 | 71 |
| 72 Member<DeviceMotionData> m_deviceMotionData; | 72 Member<DeviceMotionData> m_deviceMotionData; |
| 73 Member<DeviceAcceleration> m_acceleration; | 73 Member<DeviceAcceleration> m_acceleration; |
| 74 Member<DeviceAcceleration> m_accelerationIncludingGravity; | 74 Member<DeviceAcceleration> m_accelerationIncludingGravity; |
| 75 Member<DeviceRotationRate> m_rotationRate; | 75 Member<DeviceRotationRate> m_rotationRate; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 DEFINE_TYPE_CASTS(DeviceMotionEvent, | 78 DEFINE_TYPE_CASTS(DeviceMotionEvent, |
| 79 Event, | 79 Event, |
| 80 event, | 80 event, |
| 81 event->interfaceName() == EventNames::DeviceMotionEvent, | 81 event->interfaceName() == EventNames::DeviceMotionEvent, |
| 82 event.interfaceName() == EventNames::DeviceMotionEvent); | 82 event.interfaceName() == EventNames::DeviceMotionEvent); |
| 83 | 83 |
| 84 } // namespace blink | 84 } // namespace blink |
| 85 | 85 |
| 86 #endif // DeviceMotionEvent_h | 86 #endif // DeviceMotionEvent_h |
| OLD | NEW |