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

Unified Diff: blimp/helium/stream.h

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: Fixed a few minor 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 side-by-side diff with in-line comments
Download patch
Index: blimp/helium/stream.h
diff --git a/blimp/helium/stream.h b/blimp/helium/stream.h
index 2df1aebeab2e96999a7ff4fb200f20c317b1db3d..234587ab5e8525116a28d5aeb461b95c78095d0d 100644
--- a/blimp/helium/stream.h
+++ b/blimp/helium/stream.h
@@ -11,17 +11,19 @@
#include "blimp/helium/result.h"
namespace blimp {
-namespace helium {
-class HeliumMessage;
+class HeliumWrapper;
+
+namespace helium {
// Pure virtual interface for HeliumMessage-oriented transport streams.
// Details about how the helium::Stream is bound to the network layer are
// handled by subclasses of helium::Stream.
class Stream {
public:
+ using SendMessageCallback = base::Callback<void(Result)>;
using ReceiveMessageCallback =
- base::Callback<void(std::unique_ptr<HeliumMessage>, Result)>;
+ base::Callback<void(std::unique_ptr<HeliumWrapper>, Result)>;
virtual ~Stream() = default;
@@ -31,8 +33,8 @@ class Stream {
//
// The caller is responsible for ensuring that only one outstanding
// SendMessage() call is made at a time.
- virtual void SendMessage(std::unique_ptr<HeliumMessage> helium_message,
- const base::Callback<void(Result)>& callback) = 0;
+ virtual void SendMessage(std::unique_ptr<HeliumWrapper> helium_message,
+ const SendMessageCallback& callback) = 0;
// Asynchronously reads a HeliumMessage from the stream.
// The caller is responsible for ensuring that only one outstanding

Powered by Google App Engine
This is Rietveld 408576698