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

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

Issue 2551223003: [Sensors] Align sensor reading updates and 'onchange' notification with rAF. (Closed)
Patch Set: Comments from haraken@ 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 98a4a96edd0a992805e0d73bb7f75716009db4fb..4755c83f4bec132a519d5df02a2d5b0291e7391e 100644
--- a/third_party/WebKit/Source/modules/sensor/Sensor.h
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.h
@@ -20,7 +20,7 @@ namespace blink {
class ExceptionState;
class ExecutionContext;
class SensorReading;
-class SensorUpdateNotificationStrategy;
+class SensorUpdateNotifier;
class Sensor : public EventTargetWithInlineData,
public ActiveScriptWrappable,
@@ -83,7 +83,7 @@ class Sensor : public EventTargetWithInlineData,
// SensorController::Observer overrides.
void onSensorInitialized() override;
- void onSensorReadingChanged() override;
+ void onSensorReadingChanged(double timestamp) override;
void onSensorError(ExceptionCode,
const String& sanitizedMessage,
const String& unsanitizedMessage) override;
@@ -95,8 +95,6 @@ class Sensor : public EventTargetWithInlineData,
void startListening();
void stopListening();
- void onSensorUpdateNotification();
-
void updateState(SensorState newState);
void reportError(ExceptionCode = UnknownError,
const String& sanitizedMessage = String(),
@@ -111,7 +109,7 @@ class Sensor : public EventTargetWithInlineData,
device::mojom::blink::SensorType m_type;
SensorState m_state;
Member<SensorProxy> m_sensorProxy;
- std::unique_ptr<SensorUpdateNotificationStrategy> m_sensorUpdateNotifier;
+ std::unique_ptr<SensorUpdateNotifier> m_sensorUpdateNotifier;
device::SensorReading m_storedData;
SensorConfigurationPtr m_configuration;
};

Powered by Google App Engine
This is Rietveld 408576698