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

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

Issue 2668173003: [Sensors] Remove SensorReading interfaces (Closed)
Patch Set: updated global-interface-listing.html Created 3 years, 11 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/SensorReading.h
diff --git a/third_party/WebKit/Source/modules/sensor/SensorReading.h b/third_party/WebKit/Source/modules/sensor/SensorReading.h
deleted file mode 100644
index 49428124bfccfd450a623f067d10b292b1585e4b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/sensor/SensorReading.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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 SensorReading_h
-#define SensorReading_h
-
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "core/dom/DOMHighResTimeStamp.h"
-#include "core/dom/DOMTimeStamp.h"
-#include "modules/sensor/SensorProxy.h"
-
-namespace blink {
-
-class ScriptState;
-
-class SensorReading : public GarbageCollectedFinalized<SensorReading>,
- public ScriptWrappable {
- DEFINE_WRAPPERTYPEINFO();
-
- public:
- DEFINE_INLINE_VIRTUAL_TRACE() {}
-
- DOMHighResTimeStamp timeStamp(ScriptState*) const;
-
- // Returns 'true' if the current reading value is different than the given
- // previous one; otherwise returns 'false'.
- virtual bool isReadingUpdated(
- const device::SensorReading& previous) const = 0;
-
- const device::SensorReading& data() const { return m_data; }
-
- virtual ~SensorReading();
-
- protected:
- explicit SensorReading(const device::SensorReading&);
-
- private:
- device::SensorReading m_data;
-};
-
-class SensorReadingFactory {
- public:
- virtual SensorReading* createSensorReading(const device::SensorReading&) = 0;
-
- protected:
- SensorReadingFactory() = default;
-};
-
-template <typename SensorReadingType>
-class SensorReadingFactoryImpl : public SensorReadingFactory {
- public:
- SensorReading* createSensorReading(
- const device::SensorReading& reading) override {
- return SensorReadingType::create(reading);
- }
-};
-
-} // namepsace blink
-
-#endif // SensorReading_h
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/SensorProxy.cpp ('k') | third_party/WebKit/Source/modules/sensor/SensorReading.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698