| 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
|
| + // versa).
|
| + std::unique_ptr<GrpcOutgoingForwarder> outgoing_forwarder_;
|
| + std::unique_ptr<GrpcIncomingForwarder> incoming_forwarder_;
|
| +};
|
| +
|
| +} // namespace blimp
|
| +
|
| +#endif // BLIMP_NET_GRPC_CONNECTION_H_
|
|
|