| 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 * * Redistributions of source code must retain the above copyright | 7 * * 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 * * Redistributions in binary form must reproduce the above copyright | 9 * * 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 bool m_canProvideAlpha; | 112 bool m_canProvideAlpha; |
| 113 bool m_canProvideBeta; | 113 bool m_canProvideBeta; |
| 114 bool m_canProvideGamma; | 114 bool m_canProvideGamma; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 static DeviceMotionData* create(); | 117 static DeviceMotionData* create(); |
| 118 static DeviceMotionData* create(Acceleration*, | 118 static DeviceMotionData* create(Acceleration*, |
| 119 Acceleration* accelerationIncludingGravity, | 119 Acceleration* accelerationIncludingGravity, |
| 120 RotationRate*, | 120 RotationRate*, |
| 121 bool canProvideInterval, | |
| 122 double interval); | 121 double interval); |
| 123 static DeviceMotionData* create(const DeviceMotionEventInit&); | 122 static DeviceMotionData* create(const DeviceMotionEventInit&); |
| 124 static DeviceMotionData* create(const device::MotionData&); | 123 static DeviceMotionData* create(const device::MotionData&); |
| 125 DECLARE_TRACE(); | 124 DECLARE_TRACE(); |
| 126 | 125 |
| 127 Acceleration* getAcceleration() const { return m_acceleration.get(); } | 126 Acceleration* getAcceleration() const { return m_acceleration.get(); } |
| 128 Acceleration* getAccelerationIncludingGravity() const { | 127 Acceleration* getAccelerationIncludingGravity() const { |
| 129 return m_accelerationIncludingGravity.get(); | 128 return m_accelerationIncludingGravity.get(); |
| 130 } | 129 } |
| 131 RotationRate* getRotationRate() const { return m_rotationRate.get(); } | 130 RotationRate* getRotationRate() const { return m_rotationRate.get(); } |
| 132 | 131 |
| 133 bool canProvideInterval() const { return m_canProvideInterval; } | |
| 134 double interval() const { return m_interval; } | 132 double interval() const { return m_interval; } |
| 135 | 133 |
| 136 bool canProvideEventData() const; | 134 bool canProvideEventData() const; |
| 137 | 135 |
| 138 private: | 136 private: |
| 139 DeviceMotionData(); | 137 DeviceMotionData(); |
| 140 DeviceMotionData(Acceleration*, | 138 DeviceMotionData(Acceleration*, |
| 141 Acceleration* accelerationIncludingGravity, | 139 Acceleration* accelerationIncludingGravity, |
| 142 RotationRate*, | 140 RotationRate*, |
| 143 bool canProvideInterval, | |
| 144 double interval); | 141 double interval); |
| 145 | 142 |
| 146 Member<Acceleration> m_acceleration; | 143 Member<Acceleration> m_acceleration; |
| 147 Member<Acceleration> m_accelerationIncludingGravity; | 144 Member<Acceleration> m_accelerationIncludingGravity; |
| 148 Member<RotationRate> m_rotationRate; | 145 Member<RotationRate> m_rotationRate; |
| 149 bool m_canProvideInterval; | |
| 150 double m_interval; | 146 double m_interval; |
| 151 }; | 147 }; |
| 152 | 148 |
| 153 } // namespace blink | 149 } // namespace blink |
| 154 | 150 |
| 155 #endif // DeviceMotionData_h | 151 #endif // DeviceMotionData_h |
| OLD | NEW |