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

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

Issue 2051083002: WIP : Generic Sensor API implementation Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 6 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 PressureSensorReading_h
6 #define PressureSensorReading_h
7
8 #include <limits>
9
10 #include "modules/sensor/SensorReading.h"
11
12 namespace blink {
13
14 class MODULES_EXPORT PressureSensorReading : public SensorReading {
15 DEFINE_WRAPPERTYPEINFO();
16 public:
17 static PressureSensorReading* create(SensorController* controller)
18 {
19 return new PressureSensorReading(controller);
20 }
21
22 DECLARE_VIRTUAL_TRACE();
23
24 DOMHighResTimeStamp timeStamp() const final;
25 double pressure() const;
26
27 UpdateStatus updateInternalData() final;
28
29 private:
30 explicit PressureSensorReading(SensorController* controller);
31 void refreshData() const;
32 struct Data
33 {
34 Data()
35 : timestamp(0)
36 , pressure(std::numeric_limits<double>::infinity()) { }
37 double timestamp;
38 double pressure;
39 double unused[device::sensors::blink::kSensorReadingFieldsCount - 2];
40 } mutable m_data;
41 };
42
43 } // namepsace blink
44
45 #endif // PressureSensorReading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698