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

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

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Addressed haibin's feedback, made an ObserverList for ConnectionErrorObserver Created 4 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_ 5 #ifndef BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_
6 #define BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_ 6 #define BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "blimp/common/proto/blimp_message.pb.h" 10 #include "blimp/common/proto/blimp_message.pb.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 BlimpMessage::Type type, 42 BlimpMessage::Type type,
43 BlimpMessageProcessor* incoming_processor); 43 BlimpMessageProcessor* incoming_processor);
44 44
45 // ConnectionHandler implementation. 45 // ConnectionHandler implementation.
46 void HandleConnection(scoped_ptr<BlimpConnection> connection) override; 46 void HandleConnection(scoped_ptr<BlimpConnection> connection) override;
47 47
48 // ConnectionErrorObserver implementation. 48 // ConnectionErrorObserver implementation.
49 void OnConnectionError(int error) override; 49 void OnConnectionError(int error) override;
50 50
51 private: 51 private:
52 // Tears down the current connection and its affiliated objects without a
53 // corresponding ConnectionError.
52 void DropCurrentConnection(); 54 void DropCurrentConnection();
53 55
56 ConnectionErrorObserver* error_observer_ = nullptr;
haibinlu 2016/01/04 19:45:45 still need error_observer_?
Kevin M 2016/01/04 20:42:13 Done.
57
54 // Routes incoming messages to the relevant feature-specific handlers. 58 // Routes incoming messages to the relevant feature-specific handlers.
55 scoped_ptr<BlimpMessageDemultiplexer> demultiplexer_; 59 scoped_ptr<BlimpMessageDemultiplexer> demultiplexer_;
56 60
57 // Provides buffering of outgoing messages, for use in session-recovery. 61 // Provides buffering of outgoing messages, for use in session-recovery.
58 scoped_ptr<BlimpMessageOutputBuffer> output_buffer_; 62 scoped_ptr<BlimpMessageOutputBuffer> output_buffer_;
59 63
60 // Routes outgoing messages from feature-specific handlers to a single 64 // Routes outgoing messages from feature-specific handlers to a single
61 // message stream. 65 // message stream.
62 scoped_ptr<BlimpMessageMultiplexer> multiplexer_; 66 scoped_ptr<BlimpMessageMultiplexer> multiplexer_;
63 67
64 // Dispatches checkpoint/ACK messages to the outgoing processor, as the 68 // Dispatches checkpoint/ACK messages to the outgoing processor, as the
65 // incoming processor completes processing them. 69 // incoming processor completes processing them.
66 scoped_ptr<BlimpMessageCheckpointer> checkpointer_; 70 scoped_ptr<BlimpMessageCheckpointer> checkpointer_;
67 71
68 // Holds network resources while there is a Client connected. 72 // Holds network resources while there is a Client connected.
69 scoped_ptr<BlimpConnection> connection_; 73 scoped_ptr<BlimpConnection> connection_;
70 74
71 DISALLOW_COPY_AND_ASSIGN(BrowserConnectionHandler); 75 DISALLOW_COPY_AND_ASSIGN(BrowserConnectionHandler);
72 }; 76 };
73 77
74 } // namespace blimp 78 } // namespace blimp
75 79
76 #endif // BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_ 80 #endif // BLIMP_NET_BROWSER_CONNECTION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698