| 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 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ | 6 #define CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 RECEIVED_MOTION_DATA_MAX = 3, | 79 RECEIVED_MOTION_DATA_MAX = 3, |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 void SetLightBufferValue(double lux); | 82 void SetLightBufferValue(double lux); |
| 83 | 83 |
| 84 void CheckMotionBufferReadyToRead(); | 84 void CheckMotionBufferReadyToRead(); |
| 85 void SetMotionBufferReadyStatus(bool ready); | 85 void SetMotionBufferReadyStatus(bool ready); |
| 86 void ClearInternalMotionBuffers(); | 86 void ClearInternalMotionBuffers(); |
| 87 | 87 |
| 88 void SetOrientationBufferReadyStatus(bool ready); | 88 void SetOrientationBufferReadyStatus(bool ready); |
| 89 bool isUsingBackupSensorsForOrientation(); |
| 89 | 90 |
| 90 // The Java provider of sensors info. | 91 // The Java provider of sensors info. |
| 91 base::android::ScopedJavaGlobalRef<jobject> device_sensors_; | 92 base::android::ScopedJavaGlobalRef<jobject> device_sensors_; |
| 92 int number_active_device_motion_sensors_; | 93 int number_active_device_motion_sensors_; |
| 93 int received_motion_data_[RECEIVED_MOTION_DATA_MAX]; | 94 int received_motion_data_[RECEIVED_MOTION_DATA_MAX]; |
| 94 DeviceLightHardwareBuffer* device_light_buffer_; | 95 DeviceLightHardwareBuffer* device_light_buffer_; |
| 95 DeviceMotionHardwareBuffer* device_motion_buffer_; | 96 DeviceMotionHardwareBuffer* device_motion_buffer_; |
| 96 DeviceOrientationHardwareBuffer* device_orientation_buffer_; | 97 DeviceOrientationHardwareBuffer* device_orientation_buffer_; |
| 97 bool is_light_buffer_ready_; | 98 bool is_light_buffer_ready_; |
| 98 bool is_motion_buffer_ready_; | 99 bool is_motion_buffer_ready_; |
| 99 bool is_orientation_buffer_ready_; | 100 bool is_orientation_buffer_ready_; |
| 100 | 101 |
| 101 base::Lock light_buffer_lock_; | 102 base::Lock light_buffer_lock_; |
| 102 base::Lock motion_buffer_lock_; | 103 base::Lock motion_buffer_lock_; |
| 103 base::Lock orientation_buffer_lock_; | 104 base::Lock orientation_buffer_lock_; |
| 104 | 105 |
| 106 bool is_using_backup_sensors_for_orientation_; |
| 107 |
| 105 DISALLOW_COPY_AND_ASSIGN(SensorManagerAndroid); | 108 DISALLOW_COPY_AND_ASSIGN(SensorManagerAndroid); |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 } // namespace content | 111 } // namespace content |
| 109 | 112 |
| 110 #endif // CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ | 113 #endif // CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ |
| OLD | NEW |