| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static DeviceMotionEvent* create() { return new DeviceMotionEvent; } | 44 static DeviceMotionEvent* create() { return new DeviceMotionEvent; } |
| 45 static DeviceMotionEvent* create(const AtomicString& eventType, | 45 static DeviceMotionEvent* create(const AtomicString& eventType, |
| 46 const DeviceMotionEventInit& initializer) { | 46 const DeviceMotionEventInit& initializer) { |
| 47 return new DeviceMotionEvent(eventType, initializer); | 47 return new DeviceMotionEvent(eventType, initializer); |
| 48 } | 48 } |
| 49 static DeviceMotionEvent* create(const AtomicString& eventType, | 49 static DeviceMotionEvent* create(const AtomicString& eventType, |
| 50 DeviceMotionData* deviceMotionData) { | 50 DeviceMotionData* deviceMotionData) { |
| 51 return new DeviceMotionEvent(eventType, deviceMotionData); | 51 return new DeviceMotionEvent(eventType, deviceMotionData); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void initDeviceMotionEvent(const AtomicString& type, | |
| 55 bool bubbles, | |
| 56 bool cancelable, | |
| 57 DeviceMotionData*); | |
| 58 | |
| 59 DeviceMotionData* getDeviceMotionData() const { | 54 DeviceMotionData* getDeviceMotionData() const { |
| 60 return m_deviceMotionData.get(); | 55 return m_deviceMotionData.get(); |
| 61 } | 56 } |
| 62 | 57 |
| 63 DeviceAcceleration* acceleration(); | 58 DeviceAcceleration* acceleration(); |
| 64 DeviceAcceleration* accelerationIncludingGravity(); | 59 DeviceAcceleration* accelerationIncludingGravity(); |
| 65 DeviceRotationRate* rotationRate(); | 60 DeviceRotationRate* rotationRate(); |
| 66 double interval(bool& isNull) const; | 61 double interval(bool& isNull) const; |
| 67 | 62 |
| 68 const AtomicString& interfaceName() const override; | 63 const AtomicString& interfaceName() const override; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 82 | 77 |
| 83 DEFINE_TYPE_CASTS(DeviceMotionEvent, | 78 DEFINE_TYPE_CASTS(DeviceMotionEvent, |
| 84 Event, | 79 Event, |
| 85 event, | 80 event, |
| 86 event->interfaceName() == EventNames::DeviceMotionEvent, | 81 event->interfaceName() == EventNames::DeviceMotionEvent, |
| 87 event.interfaceName() == EventNames::DeviceMotionEvent); | 82 event.interfaceName() == EventNames::DeviceMotionEvent); |
| 88 | 83 |
| 89 } // namespace blink | 84 } // namespace blink |
| 90 | 85 |
| 91 #endif // DeviceMotionEvent_h | 86 #endif // DeviceMotionEvent_h |
| OLD | NEW |