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

Unified 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: Fix comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/network_state_handler_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..07a4a7723413ce86fef66d5b5394b819f8656e53
--- /dev/null
+++ b/chromeos/network/network_state_handler_observer.h
@@ -0,0 +1,55 @@
+// 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();
+
+ // Called when one or more network manager properties changes.
+ 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_
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/network_state_handler_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698