| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_ |
| 6 #define CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_ |
| 7 | 7 |
| 8 // TODO(joth): port to chromium | 8 #include "chrome/browser/geolocation/wifi_data_provider_common.h" |
| 9 #if 0 | |
| 10 | 9 |
| 11 #include "gears/base/common/common.h" | 10 class WifiDataProviderLinux : public WifiDataProviderCommon { |
| 12 #include "gears/base/common/event.h" | |
| 13 #include "gears/base/common/mutex.h" | |
| 14 #include "gears/base/common/thread.h" | |
| 15 #include "gears/geolocation/device_data_provider.h" | |
| 16 | |
| 17 class LinuxWifiDataProvider | |
| 18 : public WifiDataProviderImplBase, | |
| 19 public Thread { | |
| 20 public: | 11 public: |
| 21 LinuxWifiDataProvider(); | 12 WifiDataProviderLinux(); |
| 22 virtual ~LinuxWifiDataProvider(); | |
| 23 | |
| 24 // WifiDataProviderImplBase implementation | |
| 25 virtual bool GetData(WifiData *data); | |
| 26 | 13 |
| 27 private: | 14 private: |
| 28 // Thread implementation. | 15 virtual ~WifiDataProviderLinux(); |
| 29 virtual void Run(); | |
| 30 | 16 |
| 31 WifiData wifi_data_; | 17 // WifiDataProviderCommon |
| 32 Mutex data_mutex_; | 18 virtual WlanApiInterface* NewWlanApi(); |
| 33 // Event signalled to shut down the thread that polls for wifi data. | 19 virtual PollingPolicyInterface* NewPollingPolicy(); |
| 34 Event stop_event_; | |
| 35 // Whether we've successfully completed a scan for WiFi data. | |
| 36 bool is_first_scan_complete_; | |
| 37 | 20 |
| 38 DISALLOW_COPY_AND_ASSIGN(LinuxWifiDataProvider); | 21 DISALLOW_COPY_AND_ASSIGN(WifiDataProviderLinux); |
| 39 }; | 22 }; |
| 40 | 23 |
| 41 #endif // 0 | |
| 42 | |
| 43 #endif // CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_ | 24 #endif // CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_ |
| OLD | NEW |