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

Unified Diff: third_party/WebKit/Source/modules/sensor/AmbientLightSensor.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/AmbientLightSensor.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
index d7129f5910df92d9414469060de6ffdee7fed94f..4d4518b479d44252701ef3528d9f6823f00129de 100644
--- a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
@@ -6,7 +6,6 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "modules/sensor/AmbientLightSensorReading.h"
using device::mojom::blink::SensorType;
@@ -35,14 +34,8 @@ AmbientLightSensor::AmbientLightSensor(ExecutionContext* executionContext,
exceptionState,
SensorType::AMBIENT_LIGHT) {}
-AmbientLightSensorReading* AmbientLightSensor::reading() const {
- return static_cast<AmbientLightSensorReading*>(Sensor::reading());
-}
-
-std::unique_ptr<SensorReadingFactory>
-AmbientLightSensor::createSensorReadingFactory() {
- return std::unique_ptr<SensorReadingFactory>(
- new SensorReadingFactoryImpl<AmbientLightSensorReading>());
+double AmbientLightSensor::illuminance(bool& isNull) const {
+ return readingValue(0, isNull);
}
DEFINE_TRACE(AmbientLightSensor) {

Powered by Google App Engine
This is Rietveld 408576698