| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "data_fetcher_shared_memory.h" | 5 #include "data_fetcher_shared_memory.h" |
| 6 | 6 |
| 7 #include <GuidDef.h> | 7 #include <GuidDef.h> |
| 8 #include <InitGuid.h> | 8 #include <InitGuid.h> |
| 9 #include <PortableDeviceTypes.h> | 9 #include <PortableDeviceTypes.h> |
| 10 #include <Sensors.h> | 10 #include <Sensors.h> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 else if (variant_value.vt == VT_R4) | 82 else if (variant_value.vt == VT_R4) |
| 83 *value = variant_value.fltVal; | 83 *value = variant_value.fltVal; |
| 84 *has_value = true; | 84 *has_value = true; |
| 85 } else { | 85 } else { |
| 86 *value = 0; | 86 *value = 0; |
| 87 *has_value = false; | 87 *has_value = false; |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 | |
| 93 DISALLOW_COPY_AND_ASSIGN(SensorEventSink); | 92 DISALLOW_COPY_AND_ASSIGN(SensorEventSink); |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 class DataFetcherSharedMemory::SensorEventSinkOrientation | 95 class DataFetcherSharedMemory::SensorEventSinkOrientation |
| 97 : public DataFetcherSharedMemory::SensorEventSink { | 96 : public DataFetcherSharedMemory::SensorEventSink { |
| 98 public: | 97 public: |
| 99 explicit SensorEventSinkOrientation( | 98 explicit SensorEventSinkOrientation( |
| 100 DeviceOrientationHardwareBuffer* const buffer) : buffer_(buffer) {} | 99 DeviceOrientationHardwareBuffer* const buffer) : buffer_(buffer) {} |
| 101 virtual ~SensorEventSinkOrientation() {} | 100 virtual ~SensorEventSinkOrientation() {} |
| 102 | 101 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 motion_buffer_->seqlock.WriteBegin(); | 388 motion_buffer_->seqlock.WriteBegin(); |
| 390 motion_buffer_->data.allAvailableSensorsAreActive = enabled; | 389 motion_buffer_->data.allAvailableSensorsAreActive = enabled; |
| 391 motion_buffer_->seqlock.WriteEnd(); | 390 motion_buffer_->seqlock.WriteEnd(); |
| 392 } | 391 } |
| 393 default: | 392 default: |
| 394 NOTREACHED(); | 393 NOTREACHED(); |
| 395 } | 394 } |
| 396 } | 395 } |
| 397 | 396 |
| 398 } // namespace content | 397 } // namespace content |
| OLD | NEW |