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 <set> | 9 #include <set> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
16 #include "remoting/proto/internal.pb.h" | 16 #include "remoting/proto/internal.pb.h" |
17 #include "remoting/protocol/channel_dispatcher_base.h" | 17 #include "remoting/protocol/channel_dispatcher_base.h" |
18 #include "remoting/protocol/clipboard_filter.h" | 18 #include "remoting/protocol/clipboard_filter.h" |
19 #include "remoting/protocol/connection_to_host.h" | 19 #include "remoting/protocol/connection_to_host.h" |
20 #include "remoting/protocol/errors.h" | 20 #include "remoting/protocol/errors.h" |
21 #include "remoting/protocol/ice_transport.h" | 21 #include "remoting/protocol/ice_transport.h" |
22 #include "remoting/protocol/input_filter.h" | 22 #include "remoting/protocol/input_filter.h" |
23 #include "remoting/protocol/monitored_video_stub.h" | 23 #include "remoting/protocol/monitored_video_stub.h" |
24 #include "remoting/protocol/session.h" | 24 #include "remoting/protocol/session.h" |
(...skipping 14 matching lines...) Expand all Loading... |
39 public base::NonThreadSafe { | 39 public base::NonThreadSafe { |
40 public: | 40 public: |
41 IceConnectionToHost(); | 41 IceConnectionToHost(); |
42 ~IceConnectionToHost() override; | 42 ~IceConnectionToHost() override; |
43 | 43 |
44 // ConnectionToHost interface. | 44 // ConnectionToHost interface. |
45 void set_client_stub(ClientStub* client_stub) override; | 45 void set_client_stub(ClientStub* client_stub) override; |
46 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; | 46 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; |
47 void set_video_renderer(VideoRenderer* video_renderer) override; | 47 void set_video_renderer(VideoRenderer* video_renderer) override; |
48 void set_audio_stub(AudioStub* audio_stub) override; | 48 void set_audio_stub(AudioStub* audio_stub) override; |
49 void Connect(scoped_ptr<Session> session, | 49 void Connect(std::unique_ptr<Session> session, |
50 scoped_refptr<TransportContext> transport_context, | 50 scoped_refptr<TransportContext> transport_context, |
51 HostEventCallback* event_callback) override; | 51 HostEventCallback* event_callback) override; |
52 const SessionConfig& config() override; | 52 const SessionConfig& config() override; |
53 ClipboardStub* clipboard_forwarder() override; | 53 ClipboardStub* clipboard_forwarder() override; |
54 HostStub* host_stub() override; | 54 HostStub* host_stub() override; |
55 InputStub* input_stub() override; | 55 InputStub* input_stub() override; |
56 State state() const override; | 56 State state() const override; |
57 | 57 |
58 private: | 58 private: |
59 // Session::EventHandler interface. | 59 // Session::EventHandler interface. |
(...skipping 18 matching lines...) Expand all Loading... |
78 void SetState(State state, ErrorCode error); | 78 void SetState(State state, ErrorCode error); |
79 | 79 |
80 HostEventCallback* event_callback_ = nullptr; | 80 HostEventCallback* event_callback_ = nullptr; |
81 | 81 |
82 // Stub for incoming messages. | 82 // Stub for incoming messages. |
83 ClientStub* client_stub_ = nullptr; | 83 ClientStub* client_stub_ = nullptr; |
84 ClipboardStub* clipboard_stub_ = nullptr; | 84 ClipboardStub* clipboard_stub_ = nullptr; |
85 VideoRenderer* video_renderer_ = nullptr; | 85 VideoRenderer* video_renderer_ = nullptr; |
86 AudioStub* audio_stub_ = nullptr; | 86 AudioStub* audio_stub_ = nullptr; |
87 | 87 |
88 scoped_ptr<Session> session_; | 88 std::unique_ptr<Session> session_; |
89 scoped_ptr<IceTransport> transport_; | 89 std::unique_ptr<IceTransport> transport_; |
90 | 90 |
91 scoped_ptr<MonitoredVideoStub> monitored_video_stub_; | 91 std::unique_ptr<MonitoredVideoStub> monitored_video_stub_; |
92 scoped_ptr<ClientVideoDispatcher> video_dispatcher_; | 92 std::unique_ptr<ClientVideoDispatcher> video_dispatcher_; |
93 scoped_ptr<AudioReader> audio_reader_; | 93 std::unique_ptr<AudioReader> audio_reader_; |
94 scoped_ptr<ClientControlDispatcher> control_dispatcher_; | 94 std::unique_ptr<ClientControlDispatcher> control_dispatcher_; |
95 scoped_ptr<ClientEventDispatcher> event_dispatcher_; | 95 std::unique_ptr<ClientEventDispatcher> event_dispatcher_; |
96 ClipboardFilter clipboard_forwarder_; | 96 ClipboardFilter clipboard_forwarder_; |
97 InputFilter event_forwarder_; | 97 InputFilter event_forwarder_; |
98 | 98 |
99 // Internal state of the connection. | 99 // Internal state of the connection. |
100 State state_ = INITIALIZING; | 100 State state_ = INITIALIZING; |
101 ErrorCode error_ = OK; | 101 ErrorCode error_ = OK; |
102 | 102 |
103 private: | 103 private: |
104 DISALLOW_COPY_AND_ASSIGN(IceConnectionToHost); | 104 DISALLOW_COPY_AND_ASSIGN(IceConnectionToHost); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace protocol | 107 } // namespace protocol |
108 } // namespace remoting | 108 } // namespace remoting |
109 | 109 |
110 #endif // REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ | 110 #endif // REMOTING_PROTOCOL_ICE_CONNECTION_TO_HOST_H_ |
OLD | NEW |