| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef DeviceOrientationData_h | 26 #ifndef DeviceOrientationData_h |
| 27 #define DeviceOrientationData_h | 27 #define DeviceOrientationData_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/Nullable.h" | 29 #include "bindings/core/v8/Nullable.h" |
| 30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
| 31 | 31 |
| 32 namespace device { |
| 33 class OrientationData; |
| 34 } |
| 35 |
| 32 namespace blink { | 36 namespace blink { |
| 33 | 37 |
| 34 class DeviceOrientationEventInit; | 38 class DeviceOrientationEventInit; |
| 35 class WebDeviceOrientationData; | |
| 36 | 39 |
| 37 class DeviceOrientationData final | 40 class DeviceOrientationData final |
| 38 : public GarbageCollected<DeviceOrientationData> { | 41 : public GarbageCollected<DeviceOrientationData> { |
| 39 public: | 42 public: |
| 40 static DeviceOrientationData* create(); | 43 static DeviceOrientationData* create(); |
| 41 static DeviceOrientationData* create(const Nullable<double>& alpha, | 44 static DeviceOrientationData* create(const Nullable<double>& alpha, |
| 42 const Nullable<double>& beta, | 45 const Nullable<double>& beta, |
| 43 const Nullable<double>& gamma, | 46 const Nullable<double>& gamma, |
| 44 bool absolute); | 47 bool absolute); |
| 45 static DeviceOrientationData* create(const DeviceOrientationEventInit&); | 48 static DeviceOrientationData* create(const DeviceOrientationEventInit&); |
| 46 static DeviceOrientationData* create(const WebDeviceOrientationData&); | 49 static DeviceOrientationData* create(const device::OrientationData&); |
| 47 DEFINE_INLINE_TRACE() {} | 50 DEFINE_INLINE_TRACE() {} |
| 48 | 51 |
| 49 double alpha() const; | 52 double alpha() const; |
| 50 double beta() const; | 53 double beta() const; |
| 51 double gamma() const; | 54 double gamma() const; |
| 52 bool absolute() const; | 55 bool absolute() const; |
| 53 bool canProvideAlpha() const; | 56 bool canProvideAlpha() const; |
| 54 bool canProvideBeta() const; | 57 bool canProvideBeta() const; |
| 55 bool canProvideGamma() const; | 58 bool canProvideGamma() const; |
| 56 | 59 |
| 57 bool canProvideEventData() const; | 60 bool canProvideEventData() const; |
| 58 | 61 |
| 59 private: | 62 private: |
| 60 DeviceOrientationData(); | 63 DeviceOrientationData(); |
| 61 DeviceOrientationData(const Nullable<double>& alpha, | 64 DeviceOrientationData(const Nullable<double>& alpha, |
| 62 const Nullable<double>& beta, | 65 const Nullable<double>& beta, |
| 63 const Nullable<double>& gamma, | 66 const Nullable<double>& gamma, |
| 64 bool absolute); | 67 bool absolute); |
| 65 | 68 |
| 66 Nullable<double> m_alpha; | 69 Nullable<double> m_alpha; |
| 67 Nullable<double> m_beta; | 70 Nullable<double> m_beta; |
| 68 Nullable<double> m_gamma; | 71 Nullable<double> m_gamma; |
| 69 bool m_absolute; | 72 bool m_absolute; |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace blink | 75 } // namespace blink |
| 73 | 76 |
| 74 #endif // DeviceOrientationData_h | 77 #endif // DeviceOrientationData_h |
| OLD | NEW |