Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/Source/modules/device_orientation/DeviceMotionData.h

Issue 2758933002: Fix default initialization for DeviceMotionEvent.interval. (Closed)
Patch Set: Fix layout test expectations. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 bool m_canProvideAlpha; 109 bool m_canProvideAlpha;
110 bool m_canProvideBeta; 110 bool m_canProvideBeta;
111 bool m_canProvideGamma; 111 bool m_canProvideGamma;
112 }; 112 };
113 113
114 static DeviceMotionData* create(); 114 static DeviceMotionData* create();
115 static DeviceMotionData* create(Acceleration*, 115 static DeviceMotionData* create(Acceleration*,
116 Acceleration* accelerationIncludingGravity, 116 Acceleration* accelerationIncludingGravity,
117 RotationRate*, 117 RotationRate*,
118 bool canProvideInterval,
119 double interval); 118 double interval);
120 static DeviceMotionData* create(const DeviceMotionEventInit&); 119 static DeviceMotionData* create(const DeviceMotionEventInit&);
121 static DeviceMotionData* create(const WebDeviceMotionData&); 120 static DeviceMotionData* create(const WebDeviceMotionData&);
122 DECLARE_TRACE(); 121 DECLARE_TRACE();
123 122
124 Acceleration* getAcceleration() const { return m_acceleration.get(); } 123 Acceleration* getAcceleration() const { return m_acceleration.get(); }
125 Acceleration* getAccelerationIncludingGravity() const { 124 Acceleration* getAccelerationIncludingGravity() const {
126 return m_accelerationIncludingGravity.get(); 125 return m_accelerationIncludingGravity.get();
127 } 126 }
128 RotationRate* getRotationRate() const { return m_rotationRate.get(); } 127 RotationRate* getRotationRate() const { return m_rotationRate.get(); }
129 128
130 bool canProvideInterval() const { return m_canProvideInterval; }
131 double interval() const { return m_interval; } 129 double interval() const { return m_interval; }
132 130
133 bool canProvideEventData() const; 131 bool canProvideEventData() const;
134 132
135 private: 133 private:
136 DeviceMotionData(); 134 DeviceMotionData();
137 DeviceMotionData(Acceleration*, 135 DeviceMotionData(Acceleration*,
138 Acceleration* accelerationIncludingGravity, 136 Acceleration* accelerationIncludingGravity,
139 RotationRate*, 137 RotationRate*,
140 bool canProvideInterval,
141 double interval); 138 double interval);
142 139
143 Member<Acceleration> m_acceleration; 140 Member<Acceleration> m_acceleration;
144 Member<Acceleration> m_accelerationIncludingGravity; 141 Member<Acceleration> m_accelerationIncludingGravity;
145 Member<RotationRate> m_rotationRate; 142 Member<RotationRate> m_rotationRate;
146 bool m_canProvideInterval;
147 double m_interval; 143 double m_interval;
148 }; 144 };
149 145
150 } // namespace blink 146 } // namespace blink
151 147
152 #endif // DeviceMotionData_h 148 #endif // DeviceMotionData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698