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

Side by Side Diff: remoting/protocol/stream_message_pipe_adapter.h

Issue 2146213002: Add support for dynamic channels in WebrtcTransport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months 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 | « remoting/protocol/message_reader.cc ('k') | remoting/protocol/stream_message_pipe_adapter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_STREAM_MESSAGE_PIPE_ADAPTER_H_ 5 #ifndef REMOTING_PROTOCOL_STREAM_MESSAGE_PIPE_ADAPTER_H_
6 #define REMOTING_PROTOCOL_STREAM_MESSAGE_PIPE_ADAPTER_H_ 6 #define REMOTING_PROTOCOL_STREAM_MESSAGE_PIPE_ADAPTER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "remoting/protocol/message_channel_factory.h" 9 #include "remoting/protocol/message_channel_factory.h"
10 #include "remoting/protocol/message_pipe.h" 10 #include "remoting/protocol/message_pipe.h"
(...skipping 11 matching lines...) Expand all
22 // P2PStreamChannel. 22 // P2PStreamChannel.
23 class StreamMessagePipeAdapter : public MessagePipe { 23 class StreamMessagePipeAdapter : public MessagePipe {
24 public: 24 public:
25 typedef base::Callback<void(int)> ErrorCallback; 25 typedef base::Callback<void(int)> ErrorCallback;
26 26
27 StreamMessagePipeAdapter(std::unique_ptr<P2PStreamSocket> socket, 27 StreamMessagePipeAdapter(std::unique_ptr<P2PStreamSocket> socket,
28 const ErrorCallback& error_callback); 28 const ErrorCallback& error_callback);
29 ~StreamMessagePipeAdapter() override; 29 ~StreamMessagePipeAdapter() override;
30 30
31 // MessagePipe interface. 31 // MessagePipe interface.
32 void StartReceiving(const MessageReceivedCallback& callback) override; 32 void Start(EventHandler* event_handler) override;
33 void Send(google::protobuf::MessageLite* message, 33 void Send(google::protobuf::MessageLite* message,
34 const base::Closure& done) override; 34 const base::Closure& done) override;
35 35
36 private: 36 private:
37 void CloseOnError(int error); 37 void CloseOnError(int error);
38 38
39 std::unique_ptr<P2PStreamSocket> socket_; 39 std::unique_ptr<P2PStreamSocket> socket_;
40 ErrorCallback error_callback_; 40 ErrorCallback error_callback_;
41 41
42 MessageReader reader_; 42 MessageReader reader_;
(...skipping 23 matching lines...) Expand all
66 StreamChannelFactory* stream_channel_factory_; 66 StreamChannelFactory* stream_channel_factory_;
67 ErrorCallback error_callback_; 67 ErrorCallback error_callback_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(StreamMessageChannelFactoryAdapter); 69 DISALLOW_COPY_AND_ASSIGN(StreamMessageChannelFactoryAdapter);
70 }; 70 };
71 71
72 } // namespace protocol 72 } // namespace protocol
73 } // namespace remoting 73 } // namespace remoting
74 74
75 #endif // REMOTING_PROTOCOL_STREAM_MESSAGE_PIPE_ADAPTER_H_ 75 #endif // REMOTING_PROTOCOL_STREAM_MESSAGE_PIPE_ADAPTER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/message_reader.cc ('k') | remoting/protocol/stream_message_pipe_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698