OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_ |
| 6 #define CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chromeos/network/network_connection_handler.h" |
| 10 |
| 11 namespace chromeos { |
| 12 |
| 13 class NetworkConnectionHandler; |
| 14 |
| 15 namespace tether { |
| 16 |
| 17 class TetherConnector; |
| 18 class TetherDisconnector; |
| 19 |
| 20 // Handles connect/disconnect requests for Tether networks. |
| 21 class NetworkConnectionHandlerTetherDelegate |
| 22 : public NetworkConnectionHandler::TetherDelegate { |
| 23 public: |
| 24 NetworkConnectionHandlerTetherDelegate( |
| 25 NetworkConnectionHandler* network_connection_handler, |
| 26 TetherConnector* tether_connector, |
| 27 TetherDisconnector* tether_disconnector); |
| 28 ~NetworkConnectionHandlerTetherDelegate() override; |
| 29 |
| 30 // TODO(khorimoto): Add DisconnectFromNetwork to |
| 31 // NetworkConnectionHandler::TetherDelegate and override it here. |
| 32 void DisconnectFromNetwork( |
| 33 const std::string& tether_network_guid, |
| 34 const base::Closure& success_callback, |
| 35 const network_handler::StringResultCallback& error_callback); |
| 36 |
| 37 // NetworkConnectionHandler::TetherDelegate: |
| 38 void ConnectToNetwork( |
| 39 const std::string& tether_network_guid, |
| 40 const base::Closure& success_callback, |
| 41 const network_handler::StringResultCallback& error_callback) override; |
| 42 |
| 43 private: |
| 44 NetworkConnectionHandler* network_connection_handler_; |
| 45 TetherConnector* tether_connector_; |
| 46 TetherDisconnector* tether_disconnector_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTetherDelegate); |
| 49 }; |
| 50 |
| 51 } // namespace tether |
| 52 |
| 53 } // namespace chromeos |
| 54 |
| 55 #endif // CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE
_H_ |
OLD | NEW |