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

Side by Side Diff: third_party/WebKit/Source/modules/sensor/AmbientLightSensorReading.h

Issue 1892083002: Generic Sensor API : Ambient Light Sensor API. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef AmbientLightSensorReading_h
6 #define AmbientLightSensorReading_h
7
8 #include "modules/sensor/SensorReading.h"
9 #include "modules/sensor/als_reading.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class MODULES_EXPORT AmbientLightSensorReading final : public SensorReading {
15 DEFINE_WRAPPERTYPEINFO();
16
17 public:
18 static AmbientLightSensorReading* create()
19 {
20 return new AmbientLightSensorReading;
21 }
22
23 static AmbientLightSensorReading* create(double timeStamp, double illuminana ce)
24 {
25 return new AmbientLightSensorReading(timeStamp, illuminanace);
26 }
27
28 double illuminance() const { return m_illuminance; }
29 double timeStamp() const { return SensorReading::timeStamp(); }
30
31 void setIlluminance(double lux) { m_illuminance = lux; }
32
33 virtual ~AmbientLightSensorReading();
34
35 DECLARE_VIRTUAL_TRACE();
36
37 AmbientLightSensorReading();
38 AmbientLightSensorReading(double timeStamp, double illuminanace);
39 AmbientLightSensorReading(const AmbientLightSensorReading&) = default;
40
41 private:
42 double m_illuminance;
43 };
44
45 } // namespace blink
46
47 #endif // AmbientLightSensorReading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698