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 CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/browser/geolocation/wifi_data_provider.h" | 9 #include "content/browser/geolocation/wifi_data_provider.h" |
10 #include "content/browser/geolocation/wifi_polling_policy.h" | 10 #include "content/browser/geolocation/wifi_polling_policy.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class CONTENT_EXPORT WifiDataProviderChromeOs : public WifiDataProvider { | 14 class CONTENT_EXPORT WifiDataProviderChromeOs : public WifiDataProvider { |
15 public: | 15 public: |
16 WifiDataProviderChromeOs(); | 16 WifiDataProviderChromeOs(); |
17 | 17 |
18 // WifiDataProvider | 18 // WifiDataProvider |
19 virtual void StartDataProvider() override; | 19 void StartDataProvider() override; |
20 virtual void StopDataProvider() override; | 20 void StopDataProvider() override; |
21 virtual bool GetData(WifiData* data) override; | 21 bool GetData(WifiData* data) override; |
22 | 22 |
23 private: | 23 private: |
24 friend class GeolocationChromeOsWifiDataProviderTest; | 24 friend class GeolocationChromeOsWifiDataProviderTest; |
25 virtual ~WifiDataProviderChromeOs(); | 25 ~WifiDataProviderChromeOs() override; |
26 | 26 |
27 // UI thread | 27 // UI thread |
28 void DoWifiScanTaskOnUIThread(); // The polling task | 28 void DoWifiScanTaskOnUIThread(); // The polling task |
29 void DoStartTaskOnUIThread(); | 29 void DoStartTaskOnUIThread(); |
30 | 30 |
31 // Client thread | 31 // Client thread |
32 void DidWifiScanTaskNoResults(); | 32 void DidWifiScanTaskNoResults(); |
33 void DidWifiScanTask(const WifiData& new_data); | 33 void DidWifiScanTask(const WifiData& new_data); |
34 | 34 |
35 // Will schedule a scan; i.e. enqueue DoWifiScanTask deferred task. | 35 // Will schedule a scan; i.e. enqueue DoWifiScanTask deferred task. |
(...skipping 19 matching lines...) Expand all Loading... |
55 | 55 |
56 // Whether we've successfully completed a scan for WiFi data. (client thread) | 56 // Whether we've successfully completed a scan for WiFi data. (client thread) |
57 bool is_first_scan_complete_; | 57 bool is_first_scan_complete_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderChromeOs); | 59 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderChromeOs); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace content | 62 } // namespace content |
63 | 63 |
64 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 64 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
OLD | NEW |