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_common.h" | 9 #include "content/browser/geolocation/wifi_data_provider.h" |
| 10 #include "content/browser/geolocation/wifi_polling_policy.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 class CONTENT_EXPORT WifiDataProviderChromeOs | 14 class CONTENT_EXPORT WifiDataProviderChromeOs |
14 : public WifiDataProviderImplBase { | 15 : public WifiDataProviderImplBase { |
15 public: | 16 public: |
16 WifiDataProviderChromeOs(); | 17 WifiDataProviderChromeOs(); |
17 | 18 |
18 // WifiDataProviderImplBase | 19 // WifiDataProviderImplBase |
19 virtual void StartDataProvider() OVERRIDE; | 20 virtual void StartDataProvider() OVERRIDE; |
(...skipping 18 matching lines...) Expand all Loading... |
38 | 39 |
39 // Will schedule starting of the scanning process. | 40 // Will schedule starting of the scanning process. |
40 void ScheduleStart(); | 41 void ScheduleStart(); |
41 | 42 |
42 // Will schedule stopping of the scanning process. | 43 // Will schedule stopping of the scanning process. |
43 void ScheduleStop(); | 44 void ScheduleStop(); |
44 | 45 |
45 // Get access point data from chromeos. | 46 // Get access point data from chromeos. |
46 bool GetAccessPointData(WifiData::AccessPointDataSet* data); | 47 bool GetAccessPointData(WifiData::AccessPointDataSet* data); |
47 | 48 |
48 // Underlying OS wifi API. (UI thread) | |
49 scoped_ptr<WifiDataProviderCommon::WlanApiInterface> wlan_api_; | |
50 | |
51 // Controls the polling update interval. (client thread) | 49 // Controls the polling update interval. (client thread) |
52 scoped_ptr<PollingPolicyInterface> polling_policy_; | 50 scoped_ptr<WifiPollingPolicy> polling_policy_; |
53 | 51 |
54 // The latest wifi data. (client thread) | 52 // The latest wifi data. (client thread) |
55 WifiData wifi_data_; | 53 WifiData wifi_data_; |
56 | 54 |
57 // Whether we have strated the data provider. (client thread) | 55 // Whether we have strated the data provider. (client thread) |
58 bool started_; | 56 bool started_; |
59 | 57 |
60 // Whether we've successfully completed a scan for WiFi data. (client thread) | 58 // Whether we've successfully completed a scan for WiFi data. (client thread) |
61 bool is_first_scan_complete_; | 59 bool is_first_scan_complete_; |
62 | 60 |
63 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderChromeOs); | 61 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderChromeOs); |
64 }; | 62 }; |
65 | 63 |
66 } // namespace content | 64 } // namespace content |
67 | 65 |
68 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ | 66 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_ |
OLD | NEW |