| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010, The Android Open Source Project | 2 * Copyright 2010, The Android Open Source Project |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static DeviceOrientationEvent* create( | 44 static DeviceOrientationEvent* create( |
| 45 const AtomicString& eventType, | 45 const AtomicString& eventType, |
| 46 const DeviceOrientationEventInit& initializer) { | 46 const DeviceOrientationEventInit& initializer) { |
| 47 return new DeviceOrientationEvent(eventType, initializer); | 47 return new DeviceOrientationEvent(eventType, initializer); |
| 48 } | 48 } |
| 49 static DeviceOrientationEvent* create(const AtomicString& eventType, | 49 static DeviceOrientationEvent* create(const AtomicString& eventType, |
| 50 DeviceOrientationData* orientation) { | 50 DeviceOrientationData* orientation) { |
| 51 return new DeviceOrientationEvent(eventType, orientation); | 51 return new DeviceOrientationEvent(eventType, orientation); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void initDeviceOrientationEvent(const AtomicString& type, | |
| 55 bool bubbles, | |
| 56 bool cancelable, | |
| 57 const Nullable<double>& alpha, | |
| 58 const Nullable<double>& beta, | |
| 59 const Nullable<double>& gamma, | |
| 60 bool absolute); | |
| 61 | |
| 62 DeviceOrientationData* orientation() const { return m_orientation.get(); } | 54 DeviceOrientationData* orientation() const { return m_orientation.get(); } |
| 63 | 55 |
| 64 double alpha(bool& isNull) const; | 56 double alpha(bool& isNull) const; |
| 65 double beta(bool& isNull) const; | 57 double beta(bool& isNull) const; |
| 66 double gamma(bool& isNull) const; | 58 double gamma(bool& isNull) const; |
| 67 bool absolute() const; | 59 bool absolute() const; |
| 68 | 60 |
| 69 const AtomicString& interfaceName() const override; | 61 const AtomicString& interfaceName() const override; |
| 70 | 62 |
| 71 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
| 72 | 64 |
| 73 private: | 65 private: |
| 74 DeviceOrientationEvent(); | 66 DeviceOrientationEvent(); |
| 75 DeviceOrientationEvent(const AtomicString&, | 67 DeviceOrientationEvent(const AtomicString&, |
| 76 const DeviceOrientationEventInit&); | 68 const DeviceOrientationEventInit&); |
| 77 DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientationData*); | 69 DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientationData*); |
| 78 | 70 |
| 79 Member<DeviceOrientationData> m_orientation; | 71 Member<DeviceOrientationData> m_orientation; |
| 80 }; | 72 }; |
| 81 | 73 |
| 82 DEFINE_TYPE_CASTS(DeviceOrientationEvent, | 74 DEFINE_TYPE_CASTS(DeviceOrientationEvent, |
| 83 Event, | 75 Event, |
| 84 event, | 76 event, |
| 85 event->interfaceName() == EventNames::DeviceOrientationEvent, | 77 event->interfaceName() == EventNames::DeviceOrientationEvent, |
| 86 event.interfaceName() == EventNames::DeviceOrientationEvent); | 78 event.interfaceName() == EventNames::DeviceOrientationEvent); |
| 87 | 79 |
| 88 } // namespace blink | 80 } // namespace blink |
| 89 | 81 |
| 90 #endif // DeviceOrientationEvent_h | 82 #endif // DeviceOrientationEvent_h |
| OLD | NEW |