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 * * 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 16 matching lines...) Expand all Loading... |
27 #define DeviceMotionData_h | 27 #define DeviceMotionData_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 #include "wtf/RefPtr.h" | 31 #include "wtf/RefPtr.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 class WebDeviceMotionData; | 34 class WebDeviceMotionData; |
35 } | 35 } |
36 | 36 |
37 namespace WebCore { | 37 namespace blink { |
38 | 38 |
39 class DeviceMotionData : public RefCountedWillBeGarbageCollected<DeviceMotionDat
a> { | 39 class DeviceMotionData : public RefCountedWillBeGarbageCollected<DeviceMotionDat
a> { |
40 public: | 40 public: |
41 | 41 |
42 class Acceleration : public RefCountedWillBeGarbageCollected<DeviceMotionDat
a::Acceleration> { | 42 class Acceleration : public RefCountedWillBeGarbageCollected<DeviceMotionDat
a::Acceleration> { |
43 public: | 43 public: |
44 static PassRefPtrWillBeRawPtr<Acceleration> create(bool canProvideX, dou
ble x, bool canProvideY, double y, bool canProvideZ, double z); | 44 static PassRefPtrWillBeRawPtr<Acceleration> create(bool canProvideX, dou
ble x, bool canProvideY, double y, bool canProvideZ, double z); |
45 void trace(Visitor*) { } | 45 void trace(Visitor*) { } |
46 | 46 |
47 bool canProvideX() const { return m_canProvideX; } | 47 bool canProvideX() const { return m_canProvideX; } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 DeviceMotionData(); | 112 DeviceMotionData(); |
113 DeviceMotionData(PassRefPtrWillBeRawPtr<Acceleration>, PassRefPtrWillBeRawPt
r<Acceleration> accelerationIncludingGravity, PassRefPtrWillBeRawPtr<RotationRat
e>, bool canProvideInterval, double interval); | 113 DeviceMotionData(PassRefPtrWillBeRawPtr<Acceleration>, PassRefPtrWillBeRawPt
r<Acceleration> accelerationIncludingGravity, PassRefPtrWillBeRawPtr<RotationRat
e>, bool canProvideInterval, double interval); |
114 | 114 |
115 RefPtrWillBeMember<Acceleration> m_acceleration; | 115 RefPtrWillBeMember<Acceleration> m_acceleration; |
116 RefPtrWillBeMember<Acceleration> m_accelerationIncludingGravity; | 116 RefPtrWillBeMember<Acceleration> m_accelerationIncludingGravity; |
117 RefPtrWillBeMember<RotationRate> m_rotationRate; | 117 RefPtrWillBeMember<RotationRate> m_rotationRate; |
118 bool m_canProvideInterval; | 118 bool m_canProvideInterval; |
119 double m_interval; | 119 double m_interval; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace WebCore | 122 } // namespace blink |
123 | 123 |
124 #endif // DeviceMotionData_h | 124 #endif // DeviceMotionData_h |
OLD | NEW |