| 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 13 matching lines...) Expand all Loading... |
| 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 blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class DeviceOrientationEventInit; |
| 34 class WebDeviceOrientationData; | 35 class WebDeviceOrientationData; |
| 35 | 36 |
| 36 class DeviceOrientationData final | 37 class DeviceOrientationData final |
| 37 : public GarbageCollected<DeviceOrientationData> { | 38 : public GarbageCollected<DeviceOrientationData> { |
| 38 public: | 39 public: |
| 39 static DeviceOrientationData* create(); | 40 static DeviceOrientationData* create(); |
| 40 static DeviceOrientationData* create(const Nullable<double>& alpha, | 41 static DeviceOrientationData* create(const Nullable<double>& alpha, |
| 41 const Nullable<double>& beta, | 42 const Nullable<double>& beta, |
| 42 const Nullable<double>& gamma, | 43 const Nullable<double>& gamma, |
| 43 bool absolute); | 44 bool absolute); |
| 45 static DeviceOrientationData* create(const DeviceOrientationEventInit&); |
| 44 static DeviceOrientationData* create(const WebDeviceOrientationData&); | 46 static DeviceOrientationData* create(const WebDeviceOrientationData&); |
| 45 DEFINE_INLINE_TRACE() {} | 47 DEFINE_INLINE_TRACE() {} |
| 46 | 48 |
| 47 double alpha() const; | 49 double alpha() const; |
| 48 double beta() const; | 50 double beta() const; |
| 49 double gamma() const; | 51 double gamma() const; |
| 50 bool absolute() const; | 52 bool absolute() const; |
| 51 bool canProvideAlpha() const; | 53 bool canProvideAlpha() const; |
| 52 bool canProvideBeta() const; | 54 bool canProvideBeta() const; |
| 53 bool canProvideGamma() const; | 55 bool canProvideGamma() const; |
| 54 | 56 |
| 55 bool canProvideEventData() const; | 57 bool canProvideEventData() const; |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 DeviceOrientationData(); | 60 DeviceOrientationData(); |
| 59 DeviceOrientationData(const Nullable<double>& alpha, | 61 DeviceOrientationData(const Nullable<double>& alpha, |
| 60 const Nullable<double>& beta, | 62 const Nullable<double>& beta, |
| 61 const Nullable<double>& gamma, | 63 const Nullable<double>& gamma, |
| 62 bool absolute); | 64 bool absolute); |
| 63 | 65 |
| 64 Nullable<double> m_alpha; | 66 Nullable<double> m_alpha; |
| 65 Nullable<double> m_beta; | 67 Nullable<double> m_beta; |
| 66 Nullable<double> m_gamma; | 68 Nullable<double> m_gamma; |
| 67 bool m_absolute; | 69 bool m_absolute; |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace blink | 72 } // namespace blink |
| 71 | 73 |
| 72 #endif // DeviceOrientationData_h | 74 #endif // DeviceOrientationData_h |
| OLD | NEW |