Chromium Code Reviews| Index: chromeos/network/network_connection_observer.h |
| diff --git a/chromeos/network/network_connection_observer.h b/chromeos/network/network_connection_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a0e612df6b8be738acd3ab03b7c8b4234b897f02 |
| --- /dev/null |
| +++ b/chromeos/network/network_connection_observer.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 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_NETWORK_CONNECTION_OBSERVER_H_ |
| +#define CHROMEOS_NETWORK_NETWORK_CONNECTION_OBSERVER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| +#include "chromeos/chromeos_export.h" |
| + |
| +namespace base { |
| +class DictionaryValue; |
|
pneubeck (no reviews)
2015/01/04 16:57:00
nit: not used
stevenjb
2015/01/09 18:18:02
Done.
|
| +} |
| + |
| +namespace chromeos { |
| + |
| +// Observer class for network connection events. |
| +class CHROMEOS_EXPORT NetworkConnectionObserver { |
| + public: |
| + // Called when a connection to network |service_path| is requested by |
| + // calling NetworkConnectionHandler::ConnectToNetwork. |
| + virtual void ConnectToNetworkRequested(const std::string& service_path); |
| + |
| + // Called when a connection request succeeds. |
| + virtual void ConnectSucceeded(const std::string& service_path); |
| + |
| + // Called when a connection request fails. Valid error names are defined in |
| + // NetworkConnectionHandler. |
| + virtual void ConnectFailed(const std::string& service_path, |
| + const std::string& error_name); |
| + |
| + // Called when a disconnect to network |service_path| is requested by |
| + // calling NetworkConnectionHandler::DisconnectNetwork. Success or failure |
| + // for disconnect is not tracked here, observe NetworkStateHandler for state |
| + // changes instead. |
| + virtual void DiconnectRequested(const std::string& service_path); |
| + |
| + protected: |
| + virtual ~NetworkConnectionObserver(); |
| + |
| + private: |
| + DISALLOW_ASSIGN(NetworkConnectionObserver); |
|
pneubeck (no reviews)
2015/01/04 16:57:00
since this class is not abstract you should also d
stevenjb
2015/01/09 18:18:02
Done.
|
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_NETWORK_NETWORK_CONNECTION_OBSERVER_H_ |