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

Side by Side Diff: chromeos/components/tether/network_connection_handler_tether_delegate.h

Issue 2858943003: [CrOS Tether] Add disconnect handling to NetworkConnectionHandler::TetherDelegate. (Closed)
Patch Set: Rebased. Created 3 years, 7 months 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
« no previous file with comments | « no previous file | chromeos/components/tether/network_connection_handler_tether_delegate_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_ 5 #ifndef CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_
6 #define CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_ 6 #define CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chromeos/network/network_connection_handler.h" 9 #include "chromeos/network/network_connection_handler.h"
10 10
11 namespace chromeos { 11 namespace chromeos {
12 12
13 class NetworkConnectionHandler; 13 class NetworkConnectionHandler;
14 14
15 namespace tether { 15 namespace tether {
16 16
17 class TetherConnector; 17 class TetherConnector;
18 class TetherDisconnector; 18 class TetherDisconnector;
19 19
20 // Handles connect/disconnect requests for Tether networks. 20 // Handles connect/disconnect requests for Tether networks.
21 class NetworkConnectionHandlerTetherDelegate 21 class NetworkConnectionHandlerTetherDelegate
22 : public NetworkConnectionHandler::TetherDelegate { 22 : public NetworkConnectionHandler::TetherDelegate {
23 public: 23 public:
24 NetworkConnectionHandlerTetherDelegate( 24 NetworkConnectionHandlerTetherDelegate(
25 NetworkConnectionHandler* network_connection_handler, 25 NetworkConnectionHandler* network_connection_handler,
26 TetherConnector* tether_connector, 26 TetherConnector* tether_connector,
27 TetherDisconnector* tether_disconnector); 27 TetherDisconnector* tether_disconnector);
28 ~NetworkConnectionHandlerTetherDelegate() override; 28 ~NetworkConnectionHandlerTetherDelegate() override;
29 29
30 // TODO(khorimoto): Add DisconnectFromNetwork to 30 // NetworkConnectionHandler::TetherDelegate:
31 // NetworkConnectionHandler::TetherDelegate and override it here.
32 void DisconnectFromNetwork( 31 void DisconnectFromNetwork(
33 const std::string& tether_network_guid, 32 const std::string& tether_network_guid,
34 const base::Closure& success_callback, 33 const base::Closure& success_callback,
35 const network_handler::StringResultCallback& error_callback); 34 const network_handler::StringResultCallback& error_callback) override;
36
37 // NetworkConnectionHandler::TetherDelegate:
38 void ConnectToNetwork( 35 void ConnectToNetwork(
39 const std::string& tether_network_guid, 36 const std::string& tether_network_guid,
40 const base::Closure& success_callback, 37 const base::Closure& success_callback,
41 const network_handler::StringResultCallback& error_callback) override; 38 const network_handler::StringResultCallback& error_callback) override;
42 39
43 private: 40 private:
44 NetworkConnectionHandler* network_connection_handler_; 41 NetworkConnectionHandler* network_connection_handler_;
45 TetherConnector* tether_connector_; 42 TetherConnector* tether_connector_;
46 TetherDisconnector* tether_disconnector_; 43 TetherDisconnector* tether_disconnector_;
47 44
48 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTetherDelegate); 45 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTetherDelegate);
49 }; 46 };
50 47
51 } // namespace tether 48 } // namespace tether
52 49
53 } // namespace chromeos 50 } // namespace chromeos
54 51
55 #endif // CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE _H_ 52 #endif // CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE _H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/components/tether/network_connection_handler_tether_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698