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

Unified Diff: blimp/net/tcp_connection.h

Issue 2439403003: Refactor BlimpConnection to TCPConnection (Closed)
Patch Set: Sync merge Created 4 years, 2 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: blimp/net/tcp_connection.h
diff --git a/blimp/net/tcp_connection.h b/blimp/net/tcp_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..89e4c493185f91fb18299fe98de8a685536c8992
--- /dev/null
+++ b/blimp/net/tcp_connection.h
@@ -0,0 +1,44 @@
+// 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_NET_TCP_CONNECTION_H_
+#define BLIMP_NET_TCP_CONNECTION_H_
+
+#include <memory>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "blimp/net/blimp_connection.h"
+#include "blimp/net/blimp_net_export.h"
+#include "blimp/net/blimp_transport.h"
+#include "net/base/ip_endpoint.h"
+#include "net/base/net_errors.h"
+
+namespace blimp {
+
+class BlimpMessageProcessor;
+class BlimpMessagePump;
+class BlimpMessageSender;
+class MessagePort;
+
+// A |BlimpConnection| implementation that passes |BlimpMessage|s using TCP.
+class BLIMP_NET_EXPORT TCPConnection : public BlimpConnection {
+ public:
+ ~TCPConnection() override;
+ explicit TCPConnection(std::unique_ptr<MessagePort> message_port);
+
+ // BlimpConnection overrides.
+ void SetIncomingMessageProcessor(BlimpMessageProcessor* processor) override;
+
Kevin M 2016/10/25 18:49:23 remove newline
perumaal 2016/10/25 23:02:40 Ah feels weird to have all these without spacing.
+ BlimpMessageProcessor* GetOutgoingMessageProcessor() override;
+
+ private:
+ std::unique_ptr<MessagePort> message_port_;
+ std::unique_ptr<BlimpMessagePump> message_pump_;
+ std::unique_ptr<BlimpMessageSender> outgoing_msg_processor_;
+};
+
+} // namespace blimp
+
+#endif // BLIMP_NET_TCP_CONNECTION_H_

Powered by Google App Engine
This is Rietveld 408576698