| 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 12 matching lines...) Expand all Loading... |
| 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 "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 30 #include "wtf/RefCounted.h" | 30 #include "wtf/RefCounted.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 |
| 33 class WebDeviceOrientationData; | 34 class WebDeviceOrientationData; |
| 34 } | |
| 35 | |
| 36 namespace blink { | |
| 37 | 35 |
| 38 class DeviceOrientationData : public RefCountedWillBeGarbageCollected<DeviceOrie
ntationData> { | 36 class DeviceOrientationData : public RefCountedWillBeGarbageCollected<DeviceOrie
ntationData> { |
| 39 public: | 37 public: |
| 40 static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(); | 38 static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(); |
| 41 static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(bool canProvideA
lpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, doub
le gamma, bool canProvideAbsolute = false, bool absolute = false); | 39 static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(bool canProvideA
lpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, doub
le gamma, bool canProvideAbsolute = false, bool absolute = false); |
| 42 static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(const blink::Web
DeviceOrientationData&); | 40 static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(const WebDeviceO
rientationData&); |
| 43 void trace(Visitor*) { } | 41 void trace(Visitor*) { } |
| 44 | 42 |
| 45 double alpha() const; | 43 double alpha() const; |
| 46 double beta() const; | 44 double beta() const; |
| 47 double gamma() const; | 45 double gamma() const; |
| 48 bool absolute() const; | 46 bool absolute() const; |
| 49 bool canProvideAlpha() const; | 47 bool canProvideAlpha() const; |
| 50 bool canProvideBeta() const; | 48 bool canProvideBeta() const; |
| 51 bool canProvideGamma() const; | 49 bool canProvideGamma() const; |
| 52 bool canProvideAbsolute() const; | 50 bool canProvideAbsolute() const; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 63 bool m_canProvideAbsolute; | 61 bool m_canProvideAbsolute; |
| 64 double m_alpha; | 62 double m_alpha; |
| 65 double m_beta; | 63 double m_beta; |
| 66 double m_gamma; | 64 double m_gamma; |
| 67 bool m_absolute; | 65 bool m_absolute; |
| 68 }; | 66 }; |
| 69 | 67 |
| 70 } // namespace blink | 68 } // namespace blink |
| 71 | 69 |
| 72 #endif // DeviceOrientationData_h | 70 #endif // DeviceOrientationData_h |
| OLD | NEW |