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

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

Issue 2590513002: Revert of [Sensors] Align sensor reading updates and 'onchange' notification with rAF. (Closed)
Patch Set: Created 4 years 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 b59979731997a6ed46f24d0be826fb5a0bf68f58..1e2e7efb6cfa605bc131bc7ad1dd6be71b2771a8 100644
--- a/third_party/WebKit/Source/modules/sensor/Sensor.h
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.h
@@ -20,6 +20,7 @@
class ExceptionState;
class ExecutionContext;
class SensorReading;
+class SensorUpdateNotificationStrategy;
class Sensor : public EventTargetWithInlineData,
public ActiveScriptWrappable<Sensor>,
@@ -82,16 +83,19 @@
// SensorController::Observer overrides.
void onSensorInitialized() override;
- void onSensorReadingChanged(double timestamp) override;
+ void onSensorReadingChanged() override;
void onSensorError(ExceptionCode,
const String& sanitizedMessage,
const String& unsanitizedMessage) override;
+ void onSuspended() override;
void onStartRequestCompleted(bool);
void onStopRequestCompleted(bool);
void startListening();
void stopListening();
+
+ void onSensorUpdateNotification();
void updateState(SensorState newState);
void reportError(ExceptionCode = UnknownError,
@@ -107,9 +111,9 @@
device::mojom::blink::SensorType m_type;
SensorState m_state;
Member<SensorProxy> m_sensorProxy;
+ std::unique_ptr<SensorUpdateNotificationStrategy> m_sensorUpdateNotifier;
device::SensorReading m_storedData;
SensorConfigurationPtr m_configuration;
- double m_lastUpdateTimestamp;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/BUILD.gn ('k') | third_party/WebKit/Source/modules/sensor/Sensor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698