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

Unified Diff: chromeos/components/tether/network_connection_handler_tether_delegate.h

Issue 2857853005: [CrOS Tether] Create TetherDisconnector, which disconnects from active tethering sessions. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/components/tether/network_connection_handler_tether_delegate.h
diff --git a/chromeos/components/tether/network_connection_handler_tether_delegate.h b/chromeos/components/tether/network_connection_handler_tether_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..354131a5207a7f24533885509b6d24c8cf4211ac
--- /dev/null
+++ b/chromeos/components/tether/network_connection_handler_tether_delegate.h
@@ -0,0 +1,55 @@
+// Copyright 2017 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_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_
+#define CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_
+
+#include "base/macros.h"
+#include "chromeos/network/network_connection_handler.h"
+
+namespace chromeos {
+
+class NetworkConnectionHandler;
+
+namespace tether {
+
+class TetherConnector;
+class TetherDisconnector;
+
+// Handles connect/disconnect requests for Tether networks.
+class NetworkConnectionHandlerTetherDelegate
+ : public NetworkConnectionHandler::TetherDelegate {
+ public:
+ NetworkConnectionHandlerTetherDelegate(
+ NetworkConnectionHandler* network_connection_handler,
+ TetherConnector* tether_connector,
+ TetherDisconnector* tether_disconnector);
+ ~NetworkConnectionHandlerTetherDelegate() override;
+
+ // TODO(khorimoto): Add DisconnectFromNetwork to
+ // NetworkConnectionHandler::TetherDelegate and override it here.
+ void DisconnectFromNetwork(
+ const std::string& tether_network_guid,
+ const base::Closure& success_callback,
+ const network_handler::StringResultCallback& error_callback);
+
+ // NetworkConnectionHandler::TetherDelegate:
+ void ConnectToNetwork(
+ const std::string& tether_network_guid,
+ const base::Closure& success_callback,
+ const network_handler::StringResultCallback& error_callback) override;
+
+ private:
+ NetworkConnectionHandler* network_connection_handler_;
+ TetherConnector* tether_connector_;
+ TetherDisconnector* tether_disconnector_;
+
+ DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTetherDelegate);
+};
+
+} // namespace tether
+
+} // namespace chromeos
+
+#endif // CHROMEOS_COMPONENTS_TETHER_NETWORK_CONNECTION_HANDLER_TETHER_DELEGATE_H_
« no previous file with comments | « chromeos/components/tether/initializer.cc ('k') | chromeos/components/tether/network_connection_handler_tether_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698