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

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

Issue 2471003002: [sensors] Accelerometer sensor bindings implementation (Closed)
Patch Set: Fix mikhail comments Created 4 years, 1 month 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 AccelerometerReading_h
6 #define AccelerometerReading_h
7
8 #include "modules/sensor/AccelerometerReadingInit.h"
9 #include "modules/sensor/SensorReading.h"
10
11 namespace blink {
12
13 class AccelerometerReading final : public SensorReading {
14 DEFINE_WRAPPERTYPEINFO();
15
16 public:
17 static AccelerometerReading* create(const AccelerometerReadingInit& init) {
18 return new AccelerometerReading(init);
19 }
20
21 static AccelerometerReading* create(SensorProxy* proxy) {
22 return new AccelerometerReading(proxy);
23 }
24
25 ~AccelerometerReading() override;
26
27 double x() const;
28 double y() const;
29 double z() const;
30
31 bool isReadingUpdated(const SensorProxy::Reading&) const override;
32
33 DECLARE_VIRTUAL_TRACE();
34
35 private:
36 explicit AccelerometerReading(const AccelerometerReadingInit&);
37 explicit AccelerometerReading(SensorProxy*);
38
39 private:
40 AccelerometerReadingInit mAccelerometerReadingInit;
haraken 2016/11/05 12:30:38 m_AccelerometerReadingInit
41 };
42
43 } // namepsace blink
44
45 #endif // AccelerometerReading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698