Index: blimp/net/grpc_engine_transport.h |
diff --git a/blimp/net/grpc_engine_transport.h b/blimp/net/grpc_engine_transport.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8b598040f0a17c5bc3fd1be52a1e2806361cc0c |
--- /dev/null |
+++ b/blimp/net/grpc_engine_transport.h |
@@ -0,0 +1,48 @@ |
+// 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_ENGINE_TRANSPORT_H_ |
+#define BLIMP_NET_GRPC_ENGINE_TRANSPORT_H_ |
+ |
+#include <memory> |
+#include <string> |
+ |
+#include "base/callback.h" |
+#include "base/macros.h" |
+#include "blimp/common/public/session/assignment_options.h" |
+#include "blimp/net/blimp_engine_transport.h" |
+#include "blimp/net/blimp_net_export.h" |
+#include "net/base/completion_callback.h" |
+ |
+namespace grpc { |
+class Server; |
+class CompletionQueue; |
+} |
+ |
+namespace blimp { |
+ |
+class GrpcEngineStream; |
+class GrpcConnection; |
+ |
+// Class that interfaces a BlimpEngineTransport to a GrpcEngineStream |
+// through a GrpcConnection. |
+class BLIMP_NET_EXPORT GrpcEngineTransport : public BlimpEngineTransport { |
+ public: |
+ explicit GrpcEngineTransport(const AssignmentOptions& assignment_options); |
+ ~GrpcEngineTransport() override; |
+ |
+ void Connect(const net::CompletionCallback& callback) override; |
+ std::unique_ptr<BlimpConnection> MakeConnection() override; |
+ const char* GetName() const override; |
+ void GetAssignmentOptions( |
+ AssignmentOptions* assignment_options) const override; |
+ |
+ private: |
+ AssignmentOptions assignment_options_; |
+ std::unique_ptr<GrpcConnection> grpc_connection_; |
+}; |
+ |
+} // namespace blimp |
+ |
+#endif // BLIMP_NET_GRPC_ENGINE_TRANSPORT_H_ |