Index: third_party/WebKit/Source/modules/sensor/Magnetometer.cpp |
diff --git a/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp b/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp |
index 10b228c7eb1c556271c7d3f025054b41f8c67200..78a64c0ec320401a18eac1838c977c225e6ccf8a 100644 |
--- a/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp |
+++ b/third_party/WebKit/Source/modules/sensor/Magnetometer.cpp |
@@ -4,8 +4,6 @@ |
#include "modules/sensor/Magnetometer.h" |
-#include "modules/sensor/MagnetometerReading.h" |
- |
using device::mojom::blink::SensorType; |
namespace blink { |
@@ -31,13 +29,16 @@ Magnetometer::Magnetometer(ExecutionContext* executionContext, |
exceptionState, |
SensorType::MAGNETOMETER) {} |
-MagnetometerReading* Magnetometer::reading() const { |
- return static_cast<MagnetometerReading*>(Sensor::reading()); |
+double Magnetometer::x(bool& isNull) const { |
+ return readingValue(0, isNull); |
+} |
+ |
+double Magnetometer::y(bool& isNull) const { |
+ return readingValue(1, isNull); |
} |
-std::unique_ptr<SensorReadingFactory> |
-Magnetometer::createSensorReadingFactory() { |
- return WTF::makeUnique<SensorReadingFactoryImpl<MagnetometerReading>>(); |
+double Magnetometer::z(bool& isNull) const { |
+ return readingValue(2, isNull); |
} |
DEFINE_TRACE(Magnetometer) { |