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

Unified Diff: third_party/WebKit/Source/modules/sensor/PressureSensor.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/sensor/PressureSensor.h
diff --git a/third_party/WebKit/Source/modules/sensor/PressureSensor.h b/third_party/WebKit/Source/modules/sensor/PressureSensor.h
new file mode 100644
index 0000000000000000000000000000000000000000..b95876022e3a12cbc566868950b3cb554f6f93ac
--- /dev/null
+++ b/third_party/WebKit/Source/modules/sensor/PressureSensor.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PressureSensor_h
+#define PressureSensor_h
+
+#include "modules/sensor/Sensor.h"
+#include "platform/heap/Handle.h"
+#include "platform/Timer.h"
+
+namespace blink {
+
+class ExceptionState;
+class ScriptState;
+class PressureSensorReading;
+
+class MODULES_EXPORT PressureSensor : public Sensor {
+ USING_GARBAGE_COLLECTED_MIXIN(PressureSensor);
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static PressureSensor* create(ExecutionContext*, const SensorOptions&, ExceptionState&);
+ static PressureSensor* create(ExecutionContext*, ExceptionState&);
+
+ PressureSensorReading* reading() const;
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ PressureSensor(ExecutionContext*, const SensorOptions&);
+ // Sensor overrides.
+ SensorReading* createSensorReading() override;
+ device::sensors::blink::SensorConfigurationPtr createSensorOptions() override;
+};
+
+} // namespace blink
+
+#endif // PressureSensor_h
« no previous file with comments | « third_party/WebKit/Source/modules/modules.gypi ('k') | third_party/WebKit/Source/modules/sensor/PressureSensor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698