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

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

Issue 21256002: Fire null Device Motion events only once. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed comments Created 7 years, 4 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 PassRefPtr<RotationRate> rotation Rate, bool canProvideInterval, double interval); 91 PassRefPtr<RotationRate> rotation Rate, bool canProvideInterval, double interval);
92 static PassRefPtr<DeviceMotionData> create(const WebKit::WebDeviceMotionData &); 92 static PassRefPtr<DeviceMotionData> create(const WebKit::WebDeviceMotionData &);
93 93
94 PassRefPtr<Acceleration> acceleration() const { return m_acceleration; } 94 PassRefPtr<Acceleration> acceleration() const { return m_acceleration; }
95 PassRefPtr<Acceleration> accelerationIncludingGravity() const { return m_acc elerationIncludingGravity; } 95 PassRefPtr<Acceleration> accelerationIncludingGravity() const { return m_acc elerationIncludingGravity; }
96 PassRefPtr<RotationRate> rotationRate() const { return m_rotationRate; } 96 PassRefPtr<RotationRate> rotationRate() const { return m_rotationRate; }
97 97
98 bool canProvideInterval() const { return m_canProvideInterval; } 98 bool canProvideInterval() const { return m_canProvideInterval; }
99 double interval() const { return m_interval; } 99 double interval() const { return m_interval; }
100 100
101 bool canProvideEventData() const;
102
101 private: 103 private:
102 DeviceMotionData(); 104 DeviceMotionData();
103 DeviceMotionData(PassRefPtr<Acceleration> acceleration, PassRefPtr<Accelerat ion> accelerationIncludingGravity, 105 DeviceMotionData(PassRefPtr<Acceleration> acceleration, PassRefPtr<Accelerat ion> accelerationIncludingGravity,
104 PassRefPtr<RotationRate> rotationRate, bool canProvideInter val, double interval); 106 PassRefPtr<RotationRate> rotationRate, bool canProvideInter val, double interval);
105 107
106 RefPtr<Acceleration> m_acceleration; 108 RefPtr<Acceleration> m_acceleration;
107 RefPtr<Acceleration> m_accelerationIncludingGravity; 109 RefPtr<Acceleration> m_accelerationIncludingGravity;
108 RefPtr<RotationRate> m_rotationRate; 110 RefPtr<RotationRate> m_rotationRate;
109 bool m_canProvideInterval; 111 bool m_canProvideInterval;
110 double m_interval; 112 double m_interval;
111 }; 113 };
112 114
113 } // namespace WebCore 115 } // namespace WebCore
114 116
115 #endif // DeviceMotionData_h 117 #endif // DeviceMotionData_h
OLDNEW
« no previous file with comments | « Source/modules/device_orientation/DeviceMotionController.cpp ('k') | Source/modules/device_orientation/DeviceMotionData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698