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

Unified Diff: third_party/WebKit/Source/modules/sensor/Gyroscope.h

Issue 2506903003: [sensors] Gyroscope sensor bindings implementation (Closed)
Patch Set: Comments + rebase 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/sensor/Gyroscope.h
diff --git a/third_party/WebKit/Source/modules/sensor/Gyroscope.h b/third_party/WebKit/Source/modules/sensor/Gyroscope.h
new file mode 100644
index 0000000000000000000000000000000000000000..f92f0060eb11758f7dc10fb708e3aff82ed22b1d
--- /dev/null
+++ b/third_party/WebKit/Source/modules/sensor/Gyroscope.h
@@ -0,0 +1,33 @@
+// 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 Gyroscope_h
+#define Gyroscope_h
+
+#include "modules/sensor/Sensor.h"
+
+namespace blink {
+
+class GyroscopeReading;
+
+class Gyroscope final : public Sensor {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ static Gyroscope* create(ScriptState*, const SensorOptions&, ExceptionState&);
+ static Gyroscope* create(ScriptState*, ExceptionState&);
+
+ GyroscopeReading* reading() const;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ Gyroscope(ScriptState*, const SensorOptions&, ExceptionState&);
+ // Sensor overrides.
+ std::unique_ptr<SensorReadingFactory> createSensorReadingFactory() override;
+};
+
+} // namespace blink
+
+#endif // Gyroscope_h
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/BUILD.gn ('k') | third_party/WebKit/Source/modules/sensor/Gyroscope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698