| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 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 BLIMP_CLIENT_NET_CLIENT_CONNECTION_MANAGER_H_ |
| 6 #define BLIMP_CLIENT_NET_CLIENT_CONNECTION_MANAGER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "blimp/net/blimp_connection.h" |
| 10 #include "blimp/net/connection_handler.h" |
| 11 |
| 12 namespace blimp { |
| 13 |
| 14 // Coordinates the channel creation and authentication workflows for |
| 15 // outgoing (Client) network connections. |
| 16 class ClientConnectionManager : public ConnectionHandler, |
| 17 BlimpConnection::DisconnectObserver { |
| 18 explicit ClientConnectionManager(ConnectionHandler* client_browser_session); |
| 19 |
| 20 ~ClientConnectionManager(); |
| 21 |
| 22 void Connect(); |
| 23 |
| 24 // ConnectionHandler implementation. |
| 25 // Handles a new connection from a Transport and passes it to a new |
| 26 // ClientAuthHandler. |
| 27 void HandleConnection(scoped_ptr<BlimpConnection> connection) override; |
| 28 |
| 29 // BlimpConnection::DisconnectObserver implementation. |
| 30 // Called when an authenticated BlimpConnection is disconnected, which may |
| 31 // trigger reconnection. |
| 32 void OnDisconnected() override; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(ClientConnectionManager); |
| 36 }; |
| 37 |
| 38 } // namespace blimp |
| 39 |
| 40 #endif // BLIMP_CLIENT_NET_CLIENT_CONNECTION_MANAGER_H_ |
| OLD | NEW |