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

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

Issue 2356133002: Reland of [sensors] Ambient light sensor bindings implementation (Closed)
Patch Set: Rebased and fixed review comment from haraken. Created 4 years, 2 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/AmbientLightSensorReadingInit.h"
9 #include "modules/sensor/SensorReading.h"
10
11 namespace blink {
12
13 class AmbientLightSensorReading final : public SensorReading {
14 DEFINE_WRAPPERTYPEINFO();
15 public:
16
17 static AmbientLightSensorReading* create(const AmbientLightSensorReadingInit & init)
18 {
19 return new AmbientLightSensorReading(init);
20 }
21
22 static AmbientLightSensorReading* create(SensorProxy* proxy)
23 {
24 return new AmbientLightSensorReading(proxy);
25 }
26
27 ~AmbientLightSensorReading() override;
28
29 double illuminance() const;
30
31 bool isReadingUpdated(const SensorProxy::Reading&) const override;
32
33 DECLARE_VIRTUAL_TRACE();
34
35 private:
36 explicit AmbientLightSensorReading(const AmbientLightSensorReadingInit&);
37 explicit AmbientLightSensorReading(SensorProxy*);
38
39 private:
40 AmbientLightSensorReadingInit mAmbientLightSensorReadingInit;
41 };
42
43 } // namepsace blink
44
45 #endif // AmbientLightSensorReading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698