| 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_DEVICE_INERTIAL_SENSOR_SERVICE_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_ |
| 6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_ | 6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/memory/shared_memory.h" | 12 #include "base/memory/shared_memory.h" |
| 12 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
| 13 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 14 #include "content/browser/device_sensors/device_sensors_consts.h" | 15 #include "content/browser/device_sensors/device_sensors_consts.h" |
| 15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 | 19 |
| 19 class DataFetcherSharedMemory; | 20 class DataFetcherSharedMemory; |
| 20 | 21 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual ~DeviceInertialSensorService(); | 55 virtual ~DeviceInertialSensorService(); |
| 55 | 56 |
| 56 bool ChangeNumberConsumers(ConsumerType consumer_type, int delta); | 57 bool ChangeNumberConsumers(ConsumerType consumer_type, int delta); |
| 57 int GetNumberConsumers(ConsumerType consumer_type) const; | 58 int GetNumberConsumers(ConsumerType consumer_type) const; |
| 58 | 59 |
| 59 int num_light_readers_; | 60 int num_light_readers_; |
| 60 int num_motion_readers_; | 61 int num_motion_readers_; |
| 61 int num_orientation_readers_; | 62 int num_orientation_readers_; |
| 62 int num_orientation_absolute_readers_; | 63 int num_orientation_absolute_readers_; |
| 63 bool is_shutdown_; | 64 bool is_shutdown_; |
| 64 scoped_ptr<DataFetcherSharedMemory> data_fetcher_; | 65 std::unique_ptr<DataFetcherSharedMemory> data_fetcher_; |
| 65 base::ThreadChecker thread_checker_; | 66 base::ThreadChecker thread_checker_; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(DeviceInertialSensorService); | 68 DISALLOW_COPY_AND_ASSIGN(DeviceInertialSensorService); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace content | 71 } // namespace content |
| 71 | 72 |
| 72 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_ | 73 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_ |
| OLD | NEW |