Index: third_party/WebKit/Source/modules/sensor/AmbientLightSensorReading.h |
diff --git a/third_party/WebKit/Source/modules/sensor/AmbientLightSensorReading.h b/third_party/WebKit/Source/modules/sensor/AmbientLightSensorReading.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a7eaf638b1d8ea57a8e1c4048e3186d016a1582d |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/sensor/AmbientLightSensorReading.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef AmbientLightSensorReading_h |
+#define AmbientLightSensorReading_h |
+ |
+#include "modules/sensor/AmbientLightSensorReadingInit.h" |
+#include "modules/sensor/SensorReading.h" |
+ |
+namespace blink { |
+ |
+class AmbientLightSensorReading : public SensorReading { |
+ DEFINE_WRAPPERTYPEINFO(); |
+public: |
+ |
+ static AmbientLightSensorReading* create(const AmbientLightSensorReadingInit& init) |
+ { |
+ return new AmbientLightSensorReading(init); |
+ } |
+ |
+ static AmbientLightSensorReading* create(SensorProxy* proxy) |
+ { |
+ return new AmbientLightSensorReading(proxy); |
+ } |
+ |
+ double illuminance() const; |
+ |
+ bool isReadingUpdated(const SensorProxy::Reading&) const override; |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+private: |
+ explicit AmbientLightSensorReading(const AmbientLightSensorReadingInit&); |
+ explicit AmbientLightSensorReading(SensorProxy*); |
+ |
+private: |
+ AmbientLightSensorReadingInit mAmbientLightSensorReadingInit; |
+}; |
+ |
+} // namepsace blink |
+ |
+#endif // AmbientLightSensorReading_h |