| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 DEVICE_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
| 6 #define DEVICE_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "device/geolocation/wifi_data_provider.h" | 12 #include "content/browser/geolocation/wifi_data_provider.h" |
| 13 #include "device/geolocation/wifi_polling_policy.h" | 13 #include "content/browser/geolocation/wifi_polling_policy.h" |
| 14 | 14 |
| 15 namespace base { | 15 namespace content { |
| 16 class SingleThreadTaskRunner; | |
| 17 } | |
| 18 | 16 |
| 19 namespace device { | 17 class CONTENT_EXPORT WifiDataProviderChromeOs : public WifiDataProvider { |
| 20 | |
| 21 class DEVICE_GEOLOCATION_EXPORT WifiDataProviderChromeOs | |
| 22 : public WifiDataProvider { | |
| 23 public: | 18 public: |
| 24 WifiDataProviderChromeOs(); | 19 WifiDataProviderChromeOs(); |
| 25 | 20 |
| 26 // WifiDataProvider | 21 // WifiDataProvider |
| 27 void StartDataProvider() override; | 22 void StartDataProvider() override; |
| 28 void StopDataProvider() override; | 23 void StopDataProvider() override; |
| 29 bool GetData(WifiData* data) override; | 24 bool GetData(WifiData* data) override; |
| 30 | 25 |
| 31 private: | 26 private: |
| 32 friend class GeolocationChromeOsWifiDataProviderTest; | 27 friend class GeolocationChromeOsWifiDataProviderTest; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 57 | 52 |
| 58 // The latest wifi data. (client thread) | 53 // The latest wifi data. (client thread) |
| 59 WifiData wifi_data_; | 54 WifiData wifi_data_; |
| 60 | 55 |
| 61 // Whether we have strated the data provider. (client thread) | 56 // Whether we have strated the data provider. (client thread) |
| 62 bool started_; | 57 bool started_; |
| 63 | 58 |
| 64 // Whether we've successfully completed a scan for WiFi data. (client thread) | 59 // Whether we've successfully completed a scan for WiFi data. (client thread) |
| 65 bool is_first_scan_complete_; | 60 bool is_first_scan_complete_; |
| 66 | 61 |
| 67 // Used to PostTask()s from the geolocation thread to creation thread. | |
| 68 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | |
| 69 | |
| 70 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderChromeOs); | 62 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderChromeOs); |
| 71 }; | 63 }; |
| 72 | 64 |
| 73 } // namespace device | 65 } // namespace content |
| 74 | 66 |
| 75 #endif // DEVICE_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 67 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
| OLD | NEW |