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

Side by Side Diff: blimp/net/grpc_client_transport.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_stream.cc ('k') | blimp/net/grpc_client_transport.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_CLIENT_TRANSPORT_H_
6 #define BLIMP_NET_GRPC_CLIENT_TRANSPORT_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/callback.h"
12 #include "base/macros.h"
13 #include "blimp/common/public/session/assignment_options.h"
14 #include "blimp/net/blimp_net_export.h"
15 #include "blimp/net/blimp_transport.h"
16 #include "net/base/completion_callback.h"
17
18 namespace grpc {
19 class Client;
20 }
21
22 namespace blimp {
23
24 class GrpcClientStream;
25 class GrpcConnection;
26
27 // Class that interfaces a BlimpTransport to a GrpcClientStream through a
28 // GrpcConnection.
29 class BLIMP_NET_EXPORT GrpcClientTransport : public BlimpTransport {
30 public:
31 explicit GrpcClientTransport(const AssignmentOptions& assignment_options);
32
33 // Creates and connects using the GrpcClientStream and calls |callback| on
34 // the IO thread on connection success.
35 void Connect(const net::CompletionCallback& callback) override;
36
37 // Creates a new GrpcConnection and transfers ownership to caller.
38 std::unique_ptr<BlimpConnection> MakeConnection() override;
39
40 const char* GetName() const override;
41 ~GrpcClientTransport() override;
42
43 private:
44 AssignmentOptions assignment_options_;
45 std::unique_ptr<GrpcConnection> grpc_connection_;
46 };
47
48 } // namespace blimp
49
50 #endif // BLIMP_NET_GRPC_CLIENT_TRANSPORT_H_
OLDNEW
« no previous file with comments | « blimp/net/grpc_client_stream.cc ('k') | blimp/net/grpc_client_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698