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

Side by Side Diff: blimp/net/client_connection_manager.h

Issue 1429193002: Add interfaces for most major Blimp net components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address wez's feedback. Created 5 years, 1 month 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
OLDNEW
(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_NET_CLIENT_CONNECTION_MANAGER_H_
6 #define BLIMP_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 // Attempts to reconnect if an authenticated connection is
17 // disconnected.
18 class ClientConnectionManager : public ConnectionHandler,
19 BlimpConnection::DisconnectObserver {
20 // Caller is responsible for ensuring that |client_browser_session|
21 // outlives |this|.
22 explicit ClientConnectionManager(ConnectionHandler* connection_handler);
23
24 ~ClientConnectionManager() override;
25
26 void Connect();
27
28 // ConnectionHandler implementation.
29 // Handles a new connection and authenticates it before passing it on to
30 // the underlying ConnectionHandler.
31 void HandleConnection(scoped_ptr<BlimpConnection> connection) override;
32
33 // BlimpConnection::DisconnectObserver implementation.
34 // Used to implement reconnection logic on unexpected disconnections.
35 void OnDisconnected() override;
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(ClientConnectionManager);
39 };
40
41 } // namespace blimp
42
43 #endif // BLIMP_NET_CLIENT_CONNECTION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698