Chromium Code Reviews| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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->type() == eventNames().devi cemotionEvent); | |
|
tkent
2013/10/08 05:24:04
This is wrong.
- should accept NULL event
- chec
r.kasibhatla
2013/10/08 09:40:15
Done.
| |
| 74 return static_cast<DeviceMotionEvent*>(event); | |
| 75 } | |
| 76 | |
| 71 } // namespace WebCore | 77 } // namespace WebCore |
| 72 | 78 |
| 73 #endif // DeviceMotionEvent_h | 79 #endif // DeviceMotionEvent_h |
| OLD | NEW |