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 CHROME_BROWSER_DEVICE_ORIENTATION_SENSOR_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ |
6 #define CHROME_BROWSER_DEVICE_ORIENTATION_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" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/common/device_orientation/device_motion_hardware_buffer.h" | 12 #include "content/common/device_sensors/device_motion_hardware_buffer.h" |
13 #include "content/common/device_orientation/device_orientation_hardware_buffer.h
" | 13 #include "content/common/device_sensors/device_orientation_hardware_buffer.h" |
14 | 14 |
15 template<typename T> struct DefaultSingletonTraits; | 15 template<typename T> struct DefaultSingletonTraits; |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 // Android implementation of Device Orientation API. | 19 // Android implementation of Device Orientation API. |
20 // | 20 // |
21 // Android's SensorManager has a push API, so when Got*() methods are called | 21 // Android's SensorManager has a push API, so when Got*() methods are called |
22 // by the system the browser process puts the received data into a shared | 22 // by the system the browser process puts the received data into a shared |
23 // memory buffer, which is read by the renderer processes. | 23 // memory buffer, which is read by the renderer processes. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool is_orientation_buffer_ready_; | 89 bool is_orientation_buffer_ready_; |
90 | 90 |
91 base::Lock motion_buffer_lock_; | 91 base::Lock motion_buffer_lock_; |
92 base::Lock orientation_buffer_lock_; | 92 base::Lock orientation_buffer_lock_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(SensorManagerAndroid); | 94 DISALLOW_COPY_AND_ASSIGN(SensorManagerAndroid); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace content | 97 } // namespace content |
98 | 98 |
99 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_SENSOR_MANAGER_ANDROID_H_ | 99 #endif // CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_ |
OLD | NEW |