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

Unified Diff: third_party/WebKit/Source/modules/sensor/Gyroscope.cpp

Issue 2668173003: [Sensors] Remove SensorReading interfaces (Closed)
Patch Set: updated global-interface-listing.html Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp b/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
index 8f80539a68aa5f67393af47748ce4cf77803ea05..3f18c6019253232005a3e9fe47b0f0433f8a4f8a 100644
--- a/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
+++ b/third_party/WebKit/Source/modules/sensor/Gyroscope.cpp
@@ -4,7 +4,6 @@
#include "modules/sensor/Gyroscope.h"
-#include "modules/sensor/GyroscopeReading.h"
using device::mojom::blink::SensorType;
@@ -28,12 +27,16 @@ Gyroscope::Gyroscope(ExecutionContext* executionContext,
: Sensor(executionContext, options, exceptionState, SensorType::GYROSCOPE) {
}
-GyroscopeReading* Gyroscope::reading() const {
- return static_cast<GyroscopeReading*>(Sensor::reading());
+double Gyroscope::x(bool& isNull) const {
+ return readingValue(0, isNull);
}
-std::unique_ptr<SensorReadingFactory> Gyroscope::createSensorReadingFactory() {
- return WTF::makeUnique<SensorReadingFactoryImpl<GyroscopeReading>>();
+double Gyroscope::y(bool& isNull) const {
+ return readingValue(1, isNull);
+}
+
+double Gyroscope::z(bool& isNull) const {
+ return readingValue(2, isNull);
}
DEFINE_TRACE(Gyroscope) {
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Gyroscope.h ('k') | third_party/WebKit/Source/modules/sensor/Gyroscope.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698