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

Unified Diff: blimp/net/grpc_connection.h

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: blimp/net/grpc_connection.h
diff --git a/blimp/net/grpc_connection.h b/blimp/net/grpc_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..1ce340242b6c0b3195de4feec69ddee62e70c9d1
--- /dev/null
+++ b/blimp/net/grpc_connection.h
@@ -0,0 +1,42 @@
+// Copyright 2016 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_GRPC_CONNECTION_H_
+#define BLIMP_NET_GRPC_CONNECTION_H_
+
+#include "base/macros.h"
+
+#include "blimp/net/blimp_connection.h"
+#include "blimp/net/blimp_message_processor.h"
+
+namespace blimp {
+
+using BlimpMessageData = base::RefCountedData<BlimpMessage>;
+class GrpcIncomingForwarder;
+class GrpcOutgoingForwarder;
+class GrpcStream;
+
+// TODO(perumaal): Remove this class after Helium transport layer is setup.
+class GrpcConnection : public BlimpConnection {
+ public:
+ explicit GrpcConnection(std::unique_ptr<GrpcStream> stream_delegate);
+
+ BlimpMessageProcessor* GetOutgoingMessageProcessor() override;
+
+ void SetIncomingMessageProcessor(BlimpMessageProcessor* processor) override;
+
+ ~GrpcConnection() override;
+
+ private:
+ std::unique_ptr<GrpcStream> stream_;
+
+ // Forwarders that convert from |BlimpMessage|s to |HeliumMessage|s (and vice
Kevin M 2016/10/31 21:33:25 converting => wrapping?
+ // versa).
+ std::unique_ptr<GrpcOutgoingForwarder> outgoing_forwarder_;
+ std::unique_ptr<GrpcIncomingForwarder> incoming_forwarder_;
+};
+
+} // namespace blimp
+
+#endif // BLIMP_NET_GRPC_CONNECTION_H_

Powered by Google App Engine
This is Rietveld 408576698