Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chromeos/network/network_state_handler_observer.h

Issue 11192024: Add chromeos::NetworkStateManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to feedback Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
7
8 #include <string>
9 #include <vector>
10 #include "base/basictypes.h"
11
12 namespace chromeos {
13
14 class NetworkState;
15
16 // Observer class for all network state changes, including changes to
17 // active (connecting or connected) services.
18 class NetworkStateHandlerObserver {
19 public:
20 typedef std::vector<NetworkState*> NetworkStateList;
21
22 NetworkStateHandlerObserver();
23 virtual ~NetworkStateHandlerObserver();
24
25 // If |property| is non empty than that property has changed. Otherwise
pneubeck (no reviews) 2012/10/25 14:42:17 Nit: than -> then The "otherwise" doesn't sound so
stevenjb 2012/10/25 22:05:22 This wasn't meant to be sophisticated. That would
26 // multiple properties may have changed.
27 virtual void NetworkManagerChanged(const std::string& property);
pneubeck (no reviews) 2012/10/25 14:42:17 I'm rather unhappy about this mixture of property
stevenjb 2012/10/25 22:05:22 I agree that this is not ideal, and I've been cons
28 // The list of networks changed.
29 virtual void NetworkListChanged(const NetworkStateList& networks);
30 // The active network changed. |network| will be NULL if there is no longer
31 // an active network.
32 virtual void ActiveNetworkChanged(const NetworkState* network);
33 // The state of the active network changed.
34 virtual void ActiveNetworkStateChanged(const NetworkState* network);
35 // A network service property changed. |property| is the name of the changed
36 // property (from service_constants.h). Note: for the active network,
37 // this will be called in *addition* to ActiveNetworkStateChanged() if
38 // property == flimflam::kStateProperty.
39 virtual void NetworkServicePropertyChanged(const NetworkState* network,
40 const std::string& property);
41
42 private:
43 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver);
44 };
45
46 } // namespace chromeos
47
48 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698