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

Unified Diff: content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc

Issue 1947963003: Make deviceorientationabsolute confrom with spec on Chromium OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc b/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
index 16abd5ebf8a96847e5f6e63ce601bcb41335b50b..01813ffabb078a14bc7a5e5d96844bb34988650c 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
@@ -28,7 +28,16 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
sensor_manager_->StartFetchingDeviceOrientationData(
static_cast<DeviceOrientationHardwareBuffer*>(buffer));
return true;
- case CONSUMER_TYPE_ORIENTATION_ABSOLUTE:
+ case CONSUMER_TYPE_ORIENTATION_ABSOLUTE: {
+ DeviceOrientationHardwareBuffer* orientation_absolute_buffer =
+ static_cast<DeviceOrientationHardwareBuffer*>(buffer);
+ // Absolute device orientation not available on Chrome OS, let the
+ // implementation fire an all-null event to signal this to blink.
+ orientation_absolute_buffer->seqlock.WriteBegin();
timvolodine 2016/05/06 15:10:41 think it would be good to also set data.absolute =
jonross 2016/05/06 17:57:43 Done.
+ orientation_absolute_buffer->data.allAvailableSensorsAreActive = true;
+ orientation_absolute_buffer->seqlock.WriteEnd();
+ return false;
+ }
case CONSUMER_TYPE_LIGHT:
NOTIMPLEMENTED();
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698