Chromium Code Reviews| Index: chromeos/network/network_state_handler_observer.h |
| diff --git a/chromeos/network/network_state_handler_observer.h b/chromeos/network/network_state_handler_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e1fcd236568ae2f07d90d89bcb4b346427756317 |
| --- /dev/null |
| +++ b/chromeos/network/network_state_handler_observer.h |
| @@ -0,0 +1,56 @@ |
| +// Copyright (c) 2012 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_NETWORK_STATE_HANDLER_OBSERVER_H_ |
| +#define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "chromeos/chromeos_export.h" |
| + |
| +namespace chromeos { |
| + |
| +class NetworkState; |
| + |
| +// Observer class for all network state changes, including changes to |
| +// active (connecting or connected) services. |
| +class CHROMEOS_EXPORT NetworkStateHandlerObserver { |
| + public: |
| + typedef std::vector<const NetworkState*> NetworkStateList; |
| + |
| + NetworkStateHandlerObserver(); |
| + virtual ~NetworkStateHandlerObserver(); |
| + |
| + // If |property| is non empty then that property has changed. Otherwise |
|
gauravsh
2012/11/06 01:56:59
stale comment?
stevenjb
2012/11/06 03:17:03
Fixed.
|
| + // we received a complete update so multiple properties may have changed. |
| + virtual void NetworkManagerChanged(); |
| + |
| + // The list of networks changed. |
| + virtual void NetworkListChanged(const NetworkStateList& networks); |
| + |
| + // The list of devices changed. Typically we don't care about the list |
| + // of devices, so they are not passed in the method. |
| + virtual void DeviceListChanged(); |
| + |
| + // The active network changed. |network| will be NULL if there is no longer |
| + // an active network. |
| + virtual void ActiveNetworkChanged(const NetworkState* network); |
| + |
| + // The state of the active network changed. |
| + virtual void ActiveNetworkStateChanged(const NetworkState* network); |
| + |
| + // One or more network service properties changed. Note: for the active |
| + // network, this will be called in *addition* to ActiveNetworkStateChanged() |
| + // if the state property changed. |
| + virtual void NetworkServiceChanged(const NetworkState* network); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ |