diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 10:15:23 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 10:15:23 +0000 |
commit | 41b5abb4d9dfb1c4b3ace49e3e6d78a9897bf17f (patch) | |
tree | e1c6046824991e4a93853cf2b2450757388c7012 /chrome/browser/geolocation/wifi_data_provider_mac.h | |
parent | b0434b276715f15f645ae0957572dbbacabe94a9 (diff) | |
download | chromium_src-41b5abb4d9dfb1c4b3ace49e3e6d78a9897bf17f.zip chromium_src-41b5abb4d9dfb1c4b3ace49e3e6d78a9897bf17f.tar.gz chromium_src-41b5abb4d9dfb1c4b3ace49e3e6d78a9897bf17f.tar.bz2 |
Port the gears OSX wifi data provider into chrome
Pulls in the custom header file uesd to access these functions in gears
BUG=11246
TEST=unit_tests.exe --gtest_filer=Geoloc*
Review URL: http://codereview.chromium.org/600146
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/wifi_data_provider_mac.h')
-rw-r--r-- | chrome/browser/geolocation/wifi_data_provider_mac.h | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/chrome/browser/geolocation/wifi_data_provider_mac.h b/chrome/browser/geolocation/wifi_data_provider_mac.h index 10b8aa9..3958502 100644 --- a/chrome/browser/geolocation/wifi_data_provider_mac.h +++ b/chrome/browser/geolocation/wifi_data_provider_mac.h @@ -5,51 +5,20 @@ #ifndef CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_MAC_H_ #define CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_MAC_H_ -// TODO(joth): port to chromium -#if 0 +#include "chrome/browser/geolocation/wifi_data_provider_common.h" -#include "gears/base/common/common.h" -#include "gears/base/common/event.h" -#include "gears/base/common/mutex.h" -#include "gears/base/common/thread.h" -#include "gears/geolocation/device_data_provider.h" -#include "gears/geolocation/osx_wifi.h" - -class OsxWifiDataProvider - : public WifiDataProviderImplBase, - public Thread { +class OsxWifiDataProvider : public WifiDataProviderCommon { public: OsxWifiDataProvider(); - virtual ~OsxWifiDataProvider(); - - // WifiDataProviderImplBase implementation. - virtual bool GetData(WifiData *data); private: - // Thread implementation. - virtual void Run(); - - void GetAccessPointData(WifiData::AccessPointDataSet *access_points); - - // Context and function pointers for Apple80211 library. - WirelessContextPtr wifi_context_; - WirelessAttachFunction WirelessAttach_function_; - WirelessScanSplitFunction WirelessScanSplit_function_; - WirelessDetachFunction WirelessDetach_function_; - - WifiData wifi_data_; - Mutex data_mutex_; - - // Event signalled to shut down the thread that polls for wifi data. - Event stop_event_; + virtual ~OsxWifiDataProvider(); - // Whether we've successfully completed a scan for WiFi data (or the polling - // thread has terminated early). - bool is_first_scan_complete_; + // WifiDataProviderCommon + virtual WlanApiInterface* NewWlanApi(); + virtual PollingPolicyInterface* NewPolicyPolicy(); DISALLOW_COPY_AND_ASSIGN(OsxWifiDataProvider); }; -#endif // 0 - #endif // CHROME_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_MAC_H_ |