Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / chromeos / network / network_state_handler_observer.h
blobd5f134bcc879656fe692b28fd41c71364ef4e1d9
1 // Copyright (c) 2012 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.
5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "chromeos/chromeos_export.h"
14 namespace chromeos {
16 class NetworkState;
18 // Observer class for all network state changes, including changes to
19 // active (connecting or connected) services.
20 class CHROMEOS_EXPORT NetworkStateHandlerObserver {
21 public:
22 typedef std::vector<const NetworkState*> NetworkStateList;
24 NetworkStateHandlerObserver();
25 virtual ~NetworkStateHandlerObserver();
27 // Called when one or more network manager properties changes.
28 virtual void NetworkManagerChanged();
30 // The list of networks changed.
31 virtual void NetworkListChanged();
33 // The list of devices changed, or a property changed (e.g. scanning).
34 virtual void DeviceListChanged();
36 // The default network changed (includes VPNs) or one of its properties
37 // changed. This won't be called if the WiFi signal strength property
38 // changes. If interested in those events, use NetworkPropertiesUpdated()
39 // below.
40 // |network| will be NULL if there is no longer a default network.
41 virtual void DefaultNetworkChanged(const NetworkState* network);
43 // The connection state of |network| changed.
44 virtual void NetworkConnectionStateChanged(const NetworkState* network);
46 // One or more properties of |network| have been updated. Note: this will get
47 // called in *addition* to NetworkConnectionStateChanged() when the
48 // connection state property changes. Use this to track properties like
49 // wifi strength.
50 virtual void NetworkPropertiesUpdated(const NetworkState* network);
52 private:
53 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver);
56 } // namespace chromeos
58 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_