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_HOST_H_ | 5 #ifndef REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ |
6 #define REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ | 6 #define REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/sequence_checker.h" |
15 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
16 #include "base/threading/non_thread_safe.h" | |
17 #include "remoting/proto/internal.pb.h" | 17 #include "remoting/proto/internal.pb.h" |
18 #include "remoting/protocol/channel_dispatcher_base.h" | 18 #include "remoting/protocol/channel_dispatcher_base.h" |
19 #include "remoting/protocol/clipboard_filter.h" | 19 #include "remoting/protocol/clipboard_filter.h" |
20 #include "remoting/protocol/connection_to_host.h" | 20 #include "remoting/protocol/connection_to_host.h" |
21 #include "remoting/protocol/errors.h" | 21 #include "remoting/protocol/errors.h" |
22 #include "remoting/protocol/ice_transport.h" | 22 #include "remoting/protocol/ice_transport.h" |
23 #include "remoting/protocol/input_filter.h" | 23 #include "remoting/protocol/input_filter.h" |
24 #include "remoting/protocol/monitored_video_stub.h" | 24 #include "remoting/protocol/monitored_video_stub.h" |
25 #include "remoting/protocol/session.h" | 25 #include "remoting/protocol/session.h" |
26 #include "remoting/protocol/session_config.h" | 26 #include "remoting/protocol/session_config.h" |
27 | 27 |
28 namespace remoting { | 28 namespace remoting { |
29 namespace protocol { | 29 namespace protocol { |
30 | 30 |
31 class AudioDecodeScheduler; | 31 class AudioDecodeScheduler; |
32 class AudioReader; | 32 class AudioReader; |
33 class ClientControlDispatcher; | 33 class ClientControlDispatcher; |
34 class ClientEventDispatcher; | 34 class ClientEventDispatcher; |
35 class ClientVideoDispatcher; | 35 class ClientVideoDispatcher; |
36 | 36 |
37 class IceConnectionToHost : public ConnectionToHost, | 37 class IceConnectionToHost : public ConnectionToHost, |
38 public Session::EventHandler, | 38 public Session::EventHandler, |
39 public IceTransport::EventHandler, | 39 public IceTransport::EventHandler, |
40 public ChannelDispatcherBase::EventHandler, | 40 public ChannelDispatcherBase::EventHandler { |
41 public base::NonThreadSafe { | |
42 public: | 41 public: |
43 IceConnectionToHost(); | 42 IceConnectionToHost(); |
44 ~IceConnectionToHost() override; | 43 ~IceConnectionToHost() override; |
45 | 44 |
46 // ConnectionToHost interface. | 45 // ConnectionToHost interface. |
47 void set_client_stub(ClientStub* client_stub) override; | 46 void set_client_stub(ClientStub* client_stub) override; |
48 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; | 47 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; |
49 void set_video_renderer(VideoRenderer* video_renderer) override; | 48 void set_video_renderer(VideoRenderer* video_renderer) override; |
50 void InitializeAudio( | 49 void InitializeAudio( |
51 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, | 50 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 std::unique_ptr<ClientControlDispatcher> control_dispatcher_; | 99 std::unique_ptr<ClientControlDispatcher> control_dispatcher_; |
101 std::unique_ptr<ClientEventDispatcher> event_dispatcher_; | 100 std::unique_ptr<ClientEventDispatcher> event_dispatcher_; |
102 ClipboardFilter clipboard_forwarder_; | 101 ClipboardFilter clipboard_forwarder_; |
103 InputFilter event_forwarder_; | 102 InputFilter event_forwarder_; |
104 | 103 |
105 // Internal state of the connection. | 104 // Internal state of the connection. |
106 State state_ = INITIALIZING; | 105 State state_ = INITIALIZING; |
107 ErrorCode error_ = OK; | 106 ErrorCode error_ = OK; |
108 | 107 |
109 private: | 108 private: |
| 109 SEQUENCE_CHECKER(sequence_checker_); |
| 110 |
110 DISALLOW_COPY_AND_ASSIGN(IceConnectionToHost); | 111 DISALLOW_COPY_AND_ASSIGN(IceConnectionToHost); |
111 }; | 112 }; |
112 | 113 |
113 } // namespace protocol | 114 } // namespace protocol |
114 } // namespace remoting | 115 } // namespace remoting |
115 | 116 |
116 #endif // REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ | 117 #endif // REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ |
OLD | NEW |