Chromium Code Reviews| Index: chromeos/network/wifi_access_point_info_provider_chromeos.h |
| diff --git a/chromeos/network/wifi_access_point_info_provider_chromeos.h b/chromeos/network/wifi_access_point_info_provider_chromeos.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..013a3671943ec581a9c4efda7a7ff43030a5c2d1 |
| --- /dev/null |
| +++ b/chromeos/network/wifi_access_point_info_provider_chromeos.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROMEOS_NETWORK_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ |
| +#define CHROMEOS_NETWORK_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/values.h" |
| +#include "chromeos/chromeos_export.h" |
| +#include "chromeos/network/network_state_handler_observer.h" |
| +#include "net/base/wifi_access_point_info_provider.h" |
| + |
| +namespace chromeos { |
| + |
| +// WifiAccessPointInfoProviderChromeos provide the connected wifi |
|
stevenjb
2014/07/23 20:03:36
s/provide/provides/
zqiu1
2014/07/23 21:48:40
Done.
|
| +// acccess point information for chromeos. |
| +class CHROMEOS_EXPORT WifiAccessPointInfoProviderChromeos |
| + : public net::WifiAccessPointInfoProvider, |
| + public chromeos::NetworkStateHandlerObserver, |
| + public base::SupportsWeakPtr<WifiAccessPointInfoProviderChromeos> { |
| + public: |
| + WifiAccessPointInfoProviderChromeos(); |
| + virtual ~WifiAccessPointInfoProviderChromeos(); |
| + |
| + // WifiAccessPointInfoProvider |
| + virtual bool GetInfo(net::WifiAccessPointInfo* info) OVERRIDE; |
| + |
| + // NetworkStateHandlerObserver overrides. |
| + virtual void DefaultNetworkChanged( |
| + const chromeos::NetworkState* default_network) OVERRIDE; |
| + |
| + private: |
| + // Callback from Shill.Service.GetProperties. Parses |properties| to obtain |
| + // the wifi access point information. |
| + void ParseInfo(const std::string& service_path, |
| + const base::DictionaryValue& properties); |
| + |
| + net::WifiAccessPointInfo wifi_access_point_info_; |
|
stevenjb
2014/07/23 20:03:36
nit: WS
zqiu1
2014/07/23 21:48:40
Done.
|
| + DISALLOW_COPY_AND_ASSIGN(WifiAccessPointInfoProviderChromeos); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_NETWORK_WIFI_ACCESS_POINT_INFO_PROVIDER_CHROMEOS_H_ |