OLD | NEW |
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_ICE_CONNECTION_TO_CLIENT_H_ | 5 #ifndef REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ |
6 #define REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ | 6 #define REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void Disconnect(ErrorCode error) override; | 48 void Disconnect(ErrorCode error) override; |
49 void OnInputEventReceived(int64_t timestamp) override; | 49 void OnInputEventReceived(int64_t timestamp) override; |
50 std::unique_ptr<VideoStream> StartVideoStream( | 50 std::unique_ptr<VideoStream> StartVideoStream( |
51 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) override; | 51 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) override; |
52 AudioStub* audio_stub() override; | 52 AudioStub* audio_stub() override; |
53 ClientStub* client_stub() override; | 53 ClientStub* client_stub() override; |
54 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; | 54 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; |
55 void set_host_stub(HostStub* host_stub) override; | 55 void set_host_stub(HostStub* host_stub) override; |
56 void set_input_stub(InputStub* input_stub) override; | 56 void set_input_stub(InputStub* input_stub) override; |
57 | 57 |
| 58 private: |
58 // Session::EventHandler interface. | 59 // Session::EventHandler interface. |
59 void OnSessionStateChange(Session::State state) override; | 60 void OnSessionStateChange(Session::State state) override; |
60 | 61 |
61 // IceTransport::EventHandler interface. | 62 // IceTransport::EventHandler interface. |
62 void OnIceTransportRouteChange(const std::string& channel_name, | 63 void OnIceTransportRouteChange(const std::string& channel_name, |
63 const TransportRoute& route) override; | 64 const TransportRoute& route) override; |
64 void OnIceTransportError(ErrorCode error) override; | 65 void OnIceTransportError(ErrorCode error) override; |
65 | 66 |
66 // ChannelDispatcherBase::EventHandler interface. | 67 // ChannelDispatcherBase::EventHandler interface. |
67 void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override; | 68 void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override; |
| 69 void OnChannelClosed(ChannelDispatcherBase* channel_dispatcher) override; |
68 | 70 |
69 private: | |
70 void NotifyIfChannelsReady(); | 71 void NotifyIfChannelsReady(); |
71 | 72 |
72 void CloseChannels(); | 73 void CloseChannels(); |
73 | 74 |
74 base::ThreadChecker thread_checker_; | 75 base::ThreadChecker thread_checker_; |
75 | 76 |
76 // Event handler for handling events sent from this object. | 77 // Event handler for handling events sent from this object. |
77 ConnectionToClient::EventHandler* event_handler_; | 78 ConnectionToClient::EventHandler* event_handler_; |
78 | 79 |
79 std::unique_ptr<Session> session_; | 80 std::unique_ptr<Session> session_; |
80 | 81 |
81 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; | 82 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; |
82 | 83 |
83 IceTransport transport_; | 84 IceTransport transport_; |
84 | 85 |
85 std::unique_ptr<HostControlDispatcher> control_dispatcher_; | 86 std::unique_ptr<HostControlDispatcher> control_dispatcher_; |
86 std::unique_ptr<HostEventDispatcher> event_dispatcher_; | 87 std::unique_ptr<HostEventDispatcher> event_dispatcher_; |
87 std::unique_ptr<HostVideoDispatcher> video_dispatcher_; | 88 std::unique_ptr<HostVideoDispatcher> video_dispatcher_; |
88 std::unique_ptr<AudioWriter> audio_writer_; | 89 std::unique_ptr<AudioWriter> audio_writer_; |
89 | 90 |
90 DISALLOW_COPY_AND_ASSIGN(IceConnectionToClient); | 91 DISALLOW_COPY_AND_ASSIGN(IceConnectionToClient); |
91 }; | 92 }; |
92 | 93 |
93 } // namespace protocol | 94 } // namespace protocol |
94 } // namespace remoting | 95 } // namespace remoting |
95 | 96 |
96 #endif // REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ | 97 #endif // REMOTING_PROTOCOL_ICE_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |