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

Unified Diff: content/renderer/device_sensors/device_orientation_event_pump.cc

Issue 2763333002: Convert device sensors structs from Blink to Chromium naming (Closed)
Patch Set: Rebase 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: content/renderer/device_sensors/device_orientation_event_pump.cc
diff --git a/content/renderer/device_sensors/device_orientation_event_pump.cc b/content/renderer/device_sensors/device_orientation_event_pump.cc
index 7e8fa9766069b1a0b46d8b51d06f0feaf1af01a8..269eea7251fd60118850b7ad5165b33d261ce61a 100644
--- a/content/renderer/device_sensors/device_orientation_event_pump.cc
+++ b/content/renderer/device_sensors/device_orientation_event_pump.cc
@@ -41,20 +41,20 @@ static bool IsSignificantlyDifferent(bool hasAngle1, double angle1,
bool DeviceOrientationEventPumpBase::ShouldFireEvent(
const device::OrientationData& data) const {
- if (!data.allAvailableSensorsAreActive)
+ if (!data.all_available_sensors_are_active)
return false;
- if (!data.hasAlpha && !data.hasBeta && !data.hasGamma) {
+ if (!data.has_alpha && !data.has_beta && !data.has_gamma) {
// no data can be provided, this is an all-null event.
return true;
}
- return IsSignificantlyDifferent(
- data_.hasAlpha, data_.alpha, data.hasAlpha, data.alpha) ||
- IsSignificantlyDifferent(
- data_.hasBeta, data_.beta, data.hasBeta, data.beta) ||
- IsSignificantlyDifferent(
- data_.hasGamma, data_.gamma, data.hasGamma, data.gamma);
+ return IsSignificantlyDifferent(data_.has_alpha, data_.alpha, data.has_alpha,
+ data.alpha) ||
+ IsSignificantlyDifferent(data_.has_beta, data_.beta, data.has_beta,
+ data.beta) ||
+ IsSignificantlyDifferent(data_.has_gamma, data_.gamma, data.has_gamma,
+ data.gamma);
}
bool DeviceOrientationEventPumpBase::InitializeReader(

Powered by Google App Engine
This is Rietveld 408576698