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

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

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (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 a214531e08aac203df3918af31c67b02a337a684..7e8fa9766069b1a0b46d8b51d06f0feaf1af01a8 100644
--- a/content/renderer/device_sensors/device_orientation_event_pump.cc
+++ b/content/renderer/device_sensors/device_orientation_event_pump.cc
@@ -23,7 +23,7 @@ DeviceOrientationEventPumpBase::~DeviceOrientationEventPumpBase() {}
void DeviceOrientationEventPumpBase::FireEvent() {
DCHECK(listener());
- blink::WebDeviceOrientationData data;
+ device::OrientationData data;
if (reader_->GetLatestData(&data) && ShouldFireEvent(data)) {
memcpy(&data_, &data, sizeof(data));
listener()->didChangeDeviceOrientation(data);
@@ -40,7 +40,7 @@ static bool IsSignificantlyDifferent(bool hasAngle1, double angle1,
}
bool DeviceOrientationEventPumpBase::ShouldFireEvent(
- const blink::WebDeviceOrientationData& data) const {
+ const device::OrientationData& data) const {
if (!data.allAvailableSensorsAreActive)
return false;
@@ -66,8 +66,8 @@ bool DeviceOrientationEventPumpBase::InitializeReader(
}
void DeviceOrientationEventPumpBase::SendFakeDataForTesting(void* fake_data) {
- blink::WebDeviceOrientationData data =
- *static_cast<blink::WebDeviceOrientationData*>(fake_data);
+ device::OrientationData data =
+ *static_cast<device::OrientationData*>(fake_data);
listener()->didChangeDeviceOrientation(data);
}

Powered by Google App Engine
This is Rietveld 408576698