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

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

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: Address gcasto comments Created 4 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
« no previous file with comments | « blimp/net/grpc_client_transport.cc ('k') | blimp/net/grpc_connection.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_GRPC_CONNECTION_H_
6 #define BLIMP_NET_GRPC_CONNECTION_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11
12 #include "blimp/net/blimp_connection.h"
13 #include "blimp/net/blimp_net_export.h"
14
15 namespace blimp {
16
17 class BlimpMessage;
18 class BlimpMessageProcessor;
19 class GrpcIncomingForwarder;
20 class GrpcOutgoingForwarder;
21 class GrpcStream;
22
23 // TODO(perumaal): Remove this class after Helium transport layer is setup.
24
25 // A |BlimpConnection| that wraps around a |GrpcClientStream| or a
26 // |GrpcEngineStream| converting |HeliumWrapper| to/from |BlimpMessage|. This is
27 // an interim solution until we have the full Helium protocol in place. It still
28 // uses the actual |HeliumStream| interfaces to talk to the gRPC layer so the
29 // actual code in those gRPC-related classes will outlive this class.
30 class BLIMP_NET_EXPORT GrpcConnection : public BlimpConnection {
31 public:
32 explicit GrpcConnection(std::unique_ptr<GrpcStream> stream_delegate);
33 ~GrpcConnection() override;
34
35 BlimpMessageProcessor* GetOutgoingMessageProcessor() override;
36 void SetIncomingMessageProcessor(BlimpMessageProcessor* processor) override;
37
38
39 private:
40 std::unique_ptr<GrpcStream> stream_;
41
42 // Forwarders that convert from |BlimpMessage|s to |HeliumMessage|s (and vice
43 // versa).
44 std::unique_ptr<GrpcOutgoingForwarder> outgoing_forwarder_;
45 std::unique_ptr<GrpcIncomingForwarder> incoming_forwarder_;
46 };
47
48 } // namespace blimp
49
50 #endif // BLIMP_NET_GRPC_CONNECTION_H_
OLDNEW
« no previous file with comments | « blimp/net/grpc_client_transport.cc ('k') | blimp/net/grpc_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698