Index: blimp/client/net/client_connection_manager.h |
diff --git a/blimp/client/net/client_connection_manager.h b/blimp/client/net/client_connection_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..080132a8964f7e595bc411df5b8d9e144df3ba6d |
--- /dev/null |
+++ b/blimp/client/net/client_connection_manager.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2015 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 BLIMP_CLIENT_NET_CLIENT_CONNECTION_MANAGER_H_ |
+#define BLIMP_CLIENT_NET_CLIENT_CONNECTION_MANAGER_H_ |
+ |
+#include "base/macros.h" |
+#include "blimp/net/blimp_connection.h" |
+#include "blimp/net/connection_handler.h" |
+ |
+namespace blimp { |
+ |
+// Coordinates the channel creation and authentication workflows for |
+// outgoing (Client) network connections. |
+class ClientConnectionManager : public ConnectionHandler, |
+ BlimpConnection::DisconnectObserver { |
+ explicit ClientConnectionManager(ConnectionHandler* client_browser_session); |
Wez
2015/11/12 00:12:53
Add a comment to clarify ownership/lifetime expect
Kevin M
2015/11/12 01:53:15
Done.
|
+ |
+ ~ClientConnectionManager(); |
Wez
2015/11/12 00:12:53
This should be an override (see comment on Connect
Kevin M
2015/11/12 01:53:15
Done.
|
+ |
+ void Connect(); |
+ |
+ // ConnectionHandler implementation. |
+ // Handles a new connection from a Transport and passes it to a new |
+ // ClientAuthHandler. |
Wez
2015/11/12 00:12:53
ClientAuthHandler is an internal implementation de
|
+ void HandleConnection(scoped_ptr<BlimpConnection> connection) override; |
+ |
+ // BlimpConnection::DisconnectObserver implementation. |
+ // Called when an authenticated BlimpConnection is disconnected, which may |
+ // trigger reconnection. |
Wez
2015/11/12 00:12:53
It's not clear from the class level description th
Kevin M
2015/11/12 01:53:15
Done.
|
+ void OnDisconnected() override; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(ClientConnectionManager); |
+}; |
+ |
+} // namespace blimp |
+ |
+#endif // BLIMP_CLIENT_NET_CLIENT_CONNECTION_MANAGER_H_ |