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

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

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 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
« no previous file with comments | « blimp/net/input_message_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 MessagePort(std::unique_ptr<PacketReader> reader,
27 std::unique_ptr<PacketWriter> writer);
28 virtual ~MessagePort();
29
30 static std::unique_ptr<MessagePort> CreateForStreamSocketWithCompression(
31 std::unique_ptr<net::StreamSocket> socket);
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/input_message_unittest.cc ('k') | blimp/net/message_port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698