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 "content/browser/device_sensors/device_sensor_service.h" | 5 #include "device/sensors/device_sensor_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "content/browser/device_sensors/data_fetcher_shared_memory.h" | 10 #include "device/sensors/data_fetcher_shared_memory.h" |
11 | 11 |
12 namespace content { | 12 namespace device { |
13 | 13 |
14 DeviceSensorService::DeviceSensorService() | 14 DeviceSensorService::DeviceSensorService() |
15 : num_light_readers_(0), | 15 : num_light_readers_(0), |
16 num_motion_readers_(0), | 16 num_motion_readers_(0), |
17 num_orientation_readers_(0), | 17 num_orientation_readers_(0), |
18 num_orientation_absolute_readers_(0), | 18 num_orientation_absolute_readers_(0), |
19 is_shutdown_(false) {} | 19 is_shutdown_(false) {} |
20 | 20 |
21 DeviceSensorService::~DeviceSensorService() {} | 21 DeviceSensorService::~DeviceSensorService() {} |
22 | 22 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 is_shutdown_ = true; | 103 is_shutdown_ = true; |
104 } | 104 } |
105 | 105 |
106 void DeviceSensorService::SetDataFetcherForTesting( | 106 void DeviceSensorService::SetDataFetcherForTesting( |
107 DataFetcherSharedMemory* test_data_fetcher) { | 107 DataFetcherSharedMemory* test_data_fetcher) { |
108 if (data_fetcher_) | 108 if (data_fetcher_) |
109 data_fetcher_->Shutdown(); | 109 data_fetcher_->Shutdown(); |
110 data_fetcher_.reset(test_data_fetcher); | 110 data_fetcher_.reset(test_data_fetcher); |
111 } | 111 } |
112 | 112 |
113 } // namespace content | 113 } // namespace device |
OLD | NEW |