| 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 // For OSX 10.5 we use the system API function WirelessScanSplit. This function | 5 // For OSX 10.5 we use the system API function WirelessScanSplit. This function |
| 6 // is not documented or included in the SDK, so we use a reverse-engineered | 6 // is not documented or included in the SDK, so we use a reverse-engineered |
| 7 // header, osx_wifi_.h. This file is taken from the iStumbler project | 7 // header, osx_wifi_.h. This file is taken from the iStumbler project |
| 8 // (http://www.istumbler.net). | 8 // (http://www.istumbler.net). |
| 9 | 9 |
| 10 #include "content/browser/geolocation/wifi_data_provider_mac.h" | 10 #include "content/browser/geolocation/wifi_data_provider_mac.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 public: | 30 public: |
| 31 Apple80211Api(); | 31 Apple80211Api(); |
| 32 virtual ~Apple80211Api(); | 32 virtual ~Apple80211Api(); |
| 33 | 33 |
| 34 // Must be called before any other interface method. Will return false if the | 34 // Must be called before any other interface method. Will return false if the |
| 35 // Apple80211 framework cannot be initialized (e.g. running on post-10.5 OSX), | 35 // Apple80211 framework cannot be initialized (e.g. running on post-10.5 OSX), |
| 36 // in which case no other method may be called. | 36 // in which case no other method may be called. |
| 37 bool Init(); | 37 bool Init(); |
| 38 | 38 |
| 39 // WlanApiInterface | 39 // WlanApiInterface |
| 40 virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data); | 40 virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) OVERRIDE; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // Handle, context and function pointers for Apple80211 library. | 43 // Handle, context and function pointers for Apple80211 library. |
| 44 void* apple_80211_library_; | 44 void* apple_80211_library_; |
| 45 WirelessContext* wifi_context_; | 45 WirelessContext* wifi_context_; |
| 46 WirelessAttachFunction WirelessAttach_function_; | 46 WirelessAttachFunction WirelessAttach_function_; |
| 47 WirelessScanSplitFunction WirelessScanSplit_function_; | 47 WirelessScanSplitFunction WirelessScanSplit_function_; |
| 48 WirelessDetachFunction WirelessDetach_function_; | 48 WirelessDetachFunction WirelessDetach_function_; |
| 49 | 49 |
| 50 WifiData wifi_data_; | 50 WifiData wifi_data_; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 PollingPolicyInterface* MacWifiDataProvider::NewPollingPolicy() { | 188 PollingPolicyInterface* MacWifiDataProvider::NewPollingPolicy() { |
| 189 return new GenericPollingPolicy<kDefaultPollingInterval, | 189 return new GenericPollingPolicy<kDefaultPollingInterval, |
| 190 kNoChangePollingInterval, | 190 kNoChangePollingInterval, |
| 191 kTwoNoChangePollingInterval, | 191 kTwoNoChangePollingInterval, |
| 192 kNoWifiPollingIntervalMilliseconds>; | 192 kNoWifiPollingIntervalMilliseconds>; |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace content | 195 } // namespace content |
| OLD | NEW |