| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_NETWORK_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ |
| 6 #define CHROMEOS_NETWORK_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/values.h" |
| 10 #include "chromeos/chromeos_export.h" |
| 11 #include "chromeos/network/network_state_handler_observer.h" |
| 12 #include "net/base/wifi_access_point_info_provider.h" |
| 13 |
| 14 namespace chromeos { |
| 15 |
| 16 // WifiAccessPointInfoProviderChromeos provides the connected wifi |
| 17 // acccess point information for chromeos. |
| 18 class CHROMEOS_EXPORT WifiAccessPointInfoProviderChromeos |
| 19 : public net::WifiAccessPointInfoProvider, |
| 20 public chromeos::NetworkStateHandlerObserver, |
| 21 public base::SupportsWeakPtr<WifiAccessPointInfoProviderChromeos> { |
| 22 public: |
| 23 WifiAccessPointInfoProviderChromeos(); |
| 24 virtual ~WifiAccessPointInfoProviderChromeos(); |
| 25 |
| 26 // WifiAccessPointInfoProvider |
| 27 virtual bool GetInfo(net::WifiAccessPointInfo* info) OVERRIDE; |
| 28 |
| 29 // NetworkStateHandlerObserver overrides. |
| 30 virtual void DefaultNetworkChanged( |
| 31 const chromeos::NetworkState* default_network) OVERRIDE; |
| 32 |
| 33 private: |
| 34 // Callback from Shill.Service.GetProperties. Parses |properties| to obtain |
| 35 // the wifi access point information. |
| 36 void ParseInfo(const std::string& service_path, |
| 37 const base::DictionaryValue& properties); |
| 38 |
| 39 net::WifiAccessPointInfo wifi_access_point_info_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(WifiAccessPointInfoProviderChromeos); |
| 42 }; |
| 43 |
| 44 } // namespace chromeos |
| 45 |
| 46 #endif // CHROMEOS_NETWORK_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ |
| OLD | NEW |