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

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

Issue 2746573002: [Sensors] Implement bindings for AbsoluteOrientationSensor (Closed)
Patch Set: webexpose Created 3 years, 9 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/Sensor.h
diff --git a/third_party/WebKit/Source/modules/sensor/Sensor.h b/third_party/WebKit/Source/modules/sensor/Sensor.h
index 10bddbaa98389df6a52d72fd8194bb8ba15d536c..e420d2d361e46545c4a82d63eddea5c407752996 100644
--- a/third_party/WebKit/Source/modules/sensor/Sensor.h
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.h
@@ -73,7 +73,11 @@ class Sensor : public EventTargetWithInlineData,
// concrete sensor implementations can override this method to handle other
// parameters if needed.
virtual SensorConfigurationPtr createSensorConfig();
+
double readingValue(int index, bool& isNull) const;
+ double readingValueUnchecked(int index) const;
+ bool canReturnReadings() const;
+ bool isActivated() const { return m_state == SensorState::Activated; }
private:
void initSensorProxyIfNeeded();
@@ -81,9 +85,9 @@ class Sensor : public EventTargetWithInlineData,
// ContextLifecycleObserver overrides.
void contextDestroyed(ExecutionContext*) override;
- // SensorController::Observer overrides.
+ // SensorProxy::Observer overrides.
void onSensorInitialized() override;
- void onSensorReadingChanged(double timestamp) override;
+ void notifySensorChanged(double timestamp) override;
void onSensorError(ExceptionCode,
const String& sanitizedMessage,
const String& unsanitizedMessage) override;
@@ -103,8 +107,6 @@ class Sensor : public EventTargetWithInlineData,
void notifyOnActivate();
void notifyError(DOMException* error);
- bool canReturnReadings() const;
-
private:
SensorOptions m_sensorOptions;
device::mojom::blink::SensorType m_type;
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/OrientationSensor.idl ('k') | third_party/WebKit/Source/modules/sensor/Sensor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698