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 20 matching lines...) Expand all Loading... |
31 public: | 31 public: |
32 Apple80211Api(); | 32 Apple80211Api(); |
33 virtual ~Apple80211Api(); | 33 virtual ~Apple80211Api(); |
34 | 34 |
35 // Must be called before any other interface method. Will return false if the | 35 // Must be called before any other interface method. Will return false if the |
36 // Apple80211 framework cannot be initialized (e.g. running on post-10.5 OSX), | 36 // Apple80211 framework cannot be initialized (e.g. running on post-10.5 OSX), |
37 // in which case no other method may be called. | 37 // in which case no other method may be called. |
38 bool Init(); | 38 bool Init(); |
39 | 39 |
40 // WlanApiInterface | 40 // WlanApiInterface |
41 virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) OVERRIDE; | 41 virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data) override; |
42 | 42 |
43 private: | 43 private: |
44 // Handle, context and function pointers for Apple80211 library. | 44 // Handle, context and function pointers for Apple80211 library. |
45 void* apple_80211_library_; | 45 void* apple_80211_library_; |
46 WirelessContext* wifi_context_; | 46 WirelessContext* wifi_context_; |
47 WirelessAttachFunction WirelessAttach_function_; | 47 WirelessAttachFunction WirelessAttach_function_; |
48 WirelessScanSplitFunction WirelessScanSplit_function_; | 48 WirelessScanSplitFunction WirelessScanSplit_function_; |
49 WirelessDetachFunction WirelessDetach_function_; | 49 WirelessDetachFunction WirelessDetach_function_; |
50 | 50 |
51 WifiData wifi_data_; | 51 WifiData wifi_data_; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } | 187 } |
188 | 188 |
189 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() { | 189 WifiPollingPolicy* WifiDataProviderMac::NewPollingPolicy() { |
190 return new GenericWifiPollingPolicy<kDefaultPollingInterval, | 190 return new GenericWifiPollingPolicy<kDefaultPollingInterval, |
191 kNoChangePollingInterval, | 191 kNoChangePollingInterval, |
192 kTwoNoChangePollingInterval, | 192 kTwoNoChangePollingInterval, |
193 kNoWifiPollingIntervalMilliseconds>; | 193 kNoWifiPollingIntervalMilliseconds>; |
194 } | 194 } |
195 | 195 |
196 } // namespace content | 196 } // namespace content |
OLD | NEW |