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

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

Issue 2788633004: [sensors] Align Accelerometer interface with the specification (Closed)
Patch Set: Created 3 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Accelerometer_h 5 #ifndef Accelerometer_h
6 #define Accelerometer_h 6 #define Accelerometer_h
7 7
8 #include "modules/sensor/AccelerometerOptions.h"
9 #include "modules/sensor/Sensor.h" 8 #include "modules/sensor/Sensor.h"
10 9
11 namespace blink { 10 namespace blink {
12 11
13 class Accelerometer final : public Sensor { 12 class Accelerometer final : public Sensor {
14 DEFINE_WRAPPERTYPEINFO(); 13 DEFINE_WRAPPERTYPEINFO();
15 14
16 public: 15 public:
17 static Accelerometer* create(ExecutionContext*, 16 static Accelerometer* create(ExecutionContext*,
18 const AccelerometerOptions&, 17 const SensorOptions&,
19 ExceptionState&); 18 ExceptionState&);
20 static Accelerometer* create(ExecutionContext*, ExceptionState&); 19 static Accelerometer* create(ExecutionContext*, ExceptionState&);
21 20
22 double x(bool& isNull) const; 21 double x(bool& isNull) const;
23 double y(bool& isNull) const; 22 double y(bool& isNull) const;
24 double z(bool& isNull) const; 23 double z(bool& isNull) const;
25 bool includesGravity() const;
26 24
27 DECLARE_VIRTUAL_TRACE(); 25 DECLARE_VIRTUAL_TRACE();
28 26
29 private: 27 private:
30 Accelerometer(ExecutionContext*, 28 Accelerometer(ExecutionContext*, const SensorOptions&, ExceptionState&);
31 const AccelerometerOptions&,
32 ExceptionState&);
33 // Sensor overrides.
34 AccelerometerOptions m_accelerometerOptions;
35 }; 29 };
36 30
37 } // namespace blink 31 } // namespace blink
38 32
39 #endif // Accelerometer_h 33 #endif // Accelerometer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/modules_idl_files.gni ('k') | third_party/WebKit/Source/modules/sensor/Accelerometer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698