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

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

Issue 2907073003: [Chromoting] Add DataChannelManager to manage optional incoming data channels (Closed)
Patch Set: Fix test failure without DCHECK Created 3 years, 6 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/fake_message_pipe.cc ('k') | remoting/protocol/fake_message_pipe_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_FAKE_MESSAGE_PIPE_WRAPPER_H_
6 #define REMOTING_PROTOCOL_FAKE_MESSAGE_PIPE_WRAPPER_H_
7
8 #include <memory>
9
10 #include "remoting/protocol/message_pipe.h"
11
12 namespace google {
13 namespace protobuf {
14 class MessageLite;
15 } // namespace protobuf
16 } // namespace google
17
18 namespace remoting {
19 namespace protocol {
20
21 class FakeMessagePipe;
22
23 // This class should not be used explicitly: use FakeMessagePipe::Wrap().
24 class FakeMessagePipeWrapper final : public MessagePipe {
25 public:
26 // |pipe| must outlive this instance.
27 explicit FakeMessagePipeWrapper(FakeMessagePipe* pipe);
28 ~FakeMessagePipeWrapper() override;
29
30 // MessagePipe implementation.
31 void Start(EventHandler* event_handler) override;
32 void Send(google::protobuf::MessageLite* message,
33 const base::Closure& done) override;
34
35 void Receive(std::unique_ptr<CompoundBuffer> message);
36 void OpenPipe();
37 void ClosePipe();
38
39 private:
40 FakeMessagePipe* const pipe_;
41 };
42
43 } // namespace protocol
44 } // namespace remoting
45
46 #endif // REMOTING_PROTOCOL_FAKE_MESSAGE_PIPE_WRAPPER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/fake_message_pipe.cc ('k') | remoting/protocol/fake_message_pipe_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698