| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 | 377 |
| 378 void DataFetcherSharedMemory::SetBufferAvailableState( | 378 void DataFetcherSharedMemory::SetBufferAvailableState( |
| 379 ConsumerType consumer_type, bool enabled) { | 379 ConsumerType consumer_type, bool enabled) { |
| 380 switch(consumer_type) { | 380 switch(consumer_type) { |
| 381 case CONSUMER_TYPE_ORIENTATION: | 381 case CONSUMER_TYPE_ORIENTATION: |
| 382 if (orientation_buffer_) { | 382 if (orientation_buffer_) { |
| 383 orientation_buffer_->seqlock.WriteBegin(); | 383 orientation_buffer_->seqlock.WriteBegin(); |
| 384 orientation_buffer_->data.allAvailableSensorsAreActive = enabled; | 384 orientation_buffer_->data.allAvailableSensorsAreActive = enabled; |
| 385 orientation_buffer_->seqlock.WriteEnd(); | 385 orientation_buffer_->seqlock.WriteEnd(); |
| 386 } | 386 } |
| 387 break; |
| 387 case CONSUMER_TYPE_MOTION: | 388 case CONSUMER_TYPE_MOTION: |
| 388 if (motion_buffer_) { | 389 if (motion_buffer_) { |
| 389 motion_buffer_->seqlock.WriteBegin(); | 390 motion_buffer_->seqlock.WriteBegin(); |
| 390 motion_buffer_->data.allAvailableSensorsAreActive = enabled; | 391 motion_buffer_->data.allAvailableSensorsAreActive = enabled; |
| 391 motion_buffer_->seqlock.WriteEnd(); | 392 motion_buffer_->seqlock.WriteEnd(); |
| 392 } | 393 } |
| 394 break; |
| 393 default: | 395 default: |
| 394 NOTREACHED(); | 396 NOTREACHED(); |
| 395 } | 397 } |
| 396 } | 398 } |
| 397 | 399 |
| 398 } // namespace content | 400 } // namespace content |
| OLD | NEW |