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

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

Issue 2236093002: Decouple Blimp transport output from BlimpConnections using MessagePort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@statistics-singleton
Patch Set: wez feedback Created 4 years, 4 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
« no previous file with comments | « blimp/net/engine_connection_manager_unittest.cc ('k') | blimp/net/message_port.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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_MESSAGE_PORT_H_
6 #define BLIMP_NET_MESSAGE_PORT_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/supports_user_data.h"
12 #include "blimp/net/blimp_net_export.h"
13
14 namespace net {
15 class StreamSocket;
16 }
17
18 namespace blimp {
19
20 class PacketReader;
21 class PacketWriter;
22
23 // A duplexed pair of a framed reader and writer.
24 class BLIMP_NET_EXPORT MessagePort {
25 public:
26 static std::unique_ptr<MessagePort> CreateForStreamSocketWithCompression(
27 std::unique_ptr<net::StreamSocket> socket);
Wez 2016/08/24 04:21:33 nit: Methods, including static methods, should app
Kevin M 2016/08/24 19:31:59 Done.
28
29 MessagePort(std::unique_ptr<PacketReader> reader,
30 std::unique_ptr<PacketWriter> writer);
31 virtual ~MessagePort();
32
33 PacketReader* reader() const { return reader_.get(); }
34 PacketWriter* writer() const { return writer_.get(); }
35
36 private:
37 std::unique_ptr<PacketReader> reader_;
38 std::unique_ptr<PacketWriter> writer_;
39
40 DISALLOW_COPY_AND_ASSIGN(MessagePort);
41 };
42
43 } // namespace blimp
44
45 #endif // BLIMP_NET_MESSAGE_PORT_H_
OLDNEW
« no previous file with comments | « blimp/net/engine_connection_manager_unittest.cc ('k') | blimp/net/message_port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698