Expose unsandboxed plugins (PPAPI) content setting to extensions.
[chromium-blink-merge.git] / chromeos / network / network_connection_observer.h
blobd7aae7c2e3a87e781f4cd127c95d3427ed404c9a
1 // Copyright (c) 2014 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_CONNECTION_OBSERVER_H_
6 #define CHROMEOS_NETWORK_NETWORK_CONNECTION_OBSERVER_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "chromeos/chromeos_export.h"
13 namespace chromeos {
15 // Observer class for network connection events.
16 class CHROMEOS_EXPORT NetworkConnectionObserver {
17 public:
18 NetworkConnectionObserver();
20 // Called when a connection to network |service_path| is requested by
21 // calling NetworkConnectionHandler::ConnectToNetwork.
22 virtual void ConnectToNetworkRequested(const std::string& service_path);
24 // Called when a connection request succeeds.
25 virtual void ConnectSucceeded(const std::string& service_path);
27 // Called when a connection request fails. Valid error names are defined in
28 // NetworkConnectionHandler.
29 virtual void ConnectFailed(const std::string& service_path,
30 const std::string& error_name);
32 // Called when a disconnect to network |service_path| is requested by
33 // calling NetworkConnectionHandler::DisconnectNetwork. Success or failure
34 // for disconnect is not tracked here, observe NetworkStateHandler for state
35 // changes instead.
36 virtual void DiconnectRequested(const std::string& service_path);
38 protected:
39 virtual ~NetworkConnectionObserver();
41 private:
42 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionObserver);
45 } // namespace chromeos
47 #endif // CHROMEOS_NETWORK_NETWORK_CONNECTION_OBSERVER_H_