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

Side by Side Diff: remoting/protocol/webrtc_data_stream_adapter.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/named_message_pipe_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_WEBRTC_DATA_STREAM_ADAPTER_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_DATA_STREAM_ADAPTER_H_
6 #define REMOTING_PROTOCOL_WEBRTC_DATA_STREAM_ADAPTER_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_DATA_STREAM_ADAPTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 void Send(google::protobuf::MessageLite* message, 32 void Send(google::protobuf::MessageLite* message,
33 const base::Closure& done) override; 33 const base::Closure& done) override;
34 34
35 private: 35 private:
36 enum class State { CONNECTING, OPEN, CLOSED }; 36 enum class State { CONNECTING, OPEN, CLOSED };
37 37
38 // webrtc::DataChannelObserver interface. 38 // webrtc::DataChannelObserver interface.
39 void OnStateChange() override; 39 void OnStateChange() override;
40 void OnMessage(const webrtc::DataBuffer& buffer) override; 40 void OnMessage(const webrtc::DataBuffer& buffer) override;
41 41
42 void OnConnected();
43
44 void OnClosed();
45
46 rtc::scoped_refptr<webrtc::DataChannelInterface> channel_; 42 rtc::scoped_refptr<webrtc::DataChannelInterface> channel_;
47 43
48 EventHandler* event_handler_ = nullptr; 44 EventHandler* event_handler_ = nullptr;
49 45
50 State state_ = State::CONNECTING; 46 State state_ = State::CONNECTING;
51 47
52 DISALLOW_COPY_AND_ASSIGN(WebrtcDataStreamAdapter); 48 DISALLOW_COPY_AND_ASSIGN(WebrtcDataStreamAdapter);
53 }; 49 };
54 50
55 } // namespace protocol 51 } // namespace protocol
56 } // namespace remoting 52 } // namespace remoting
57 53
58 #endif // REMOTING_PROTOCOL_WEBRTC_DATA_STREAM_ADAPTER_H_ 54 #endif // REMOTING_PROTOCOL_WEBRTC_DATA_STREAM_ADAPTER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/named_message_pipe_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698