OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "remoting/protocol/connection_to_client.h" | 5 #include "remoting/protocol/connection_to_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "google/protobuf/message.h" | 10 #include "google/protobuf/message.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 DCHECK(CalledOnValidThread()); | 73 DCHECK(CalledOnValidThread()); |
74 return control_dispatcher_.get(); | 74 return control_dispatcher_.get(); |
75 } | 75 } |
76 | 76 |
77 void ConnectionToClient::set_clipboard_stub( | 77 void ConnectionToClient::set_clipboard_stub( |
78 protocol::ClipboardStub* clipboard_stub) { | 78 protocol::ClipboardStub* clipboard_stub) { |
79 DCHECK(CalledOnValidThread()); | 79 DCHECK(CalledOnValidThread()); |
80 clipboard_stub_ = clipboard_stub; | 80 clipboard_stub_ = clipboard_stub; |
81 } | 81 } |
82 | 82 |
| 83 ClipboardStub* ConnectionToClient::clipboard_stub() { |
| 84 DCHECK(CalledOnValidThread()); |
| 85 return clipboard_stub_; |
| 86 } |
| 87 |
83 void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) { | 88 void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) { |
84 DCHECK(CalledOnValidThread()); | 89 DCHECK(CalledOnValidThread()); |
85 host_stub_ = host_stub; | 90 host_stub_ = host_stub; |
86 } | 91 } |
87 | 92 |
| 93 HostStub* ConnectionToClient::host_stub() { |
| 94 DCHECK(CalledOnValidThread()); |
| 95 return host_stub_; |
| 96 } |
| 97 |
88 void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) { | 98 void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) { |
89 DCHECK(CalledOnValidThread()); | 99 DCHECK(CalledOnValidThread()); |
90 input_stub_ = input_stub; | 100 input_stub_ = input_stub; |
91 } | 101 } |
92 | 102 |
| 103 InputStub* ConnectionToClient::input_stub() { |
| 104 DCHECK(CalledOnValidThread()); |
| 105 return input_stub_; |
| 106 } |
| 107 |
93 void ConnectionToClient::OnSessionStateChange(Session::State state) { | 108 void ConnectionToClient::OnSessionStateChange(Session::State state) { |
94 DCHECK(CalledOnValidThread()); | 109 DCHECK(CalledOnValidThread()); |
95 | 110 |
96 DCHECK(handler_); | 111 DCHECK(handler_); |
97 switch(state) { | 112 switch(state) { |
98 case Session::INITIALIZING: | 113 case Session::INITIALIZING: |
99 case Session::CONNECTING: | 114 case Session::CONNECTING: |
100 case Session::CONNECTED: | 115 case Session::CONNECTED: |
101 // Don't care about these events. | 116 // Don't care about these events. |
102 break; | 117 break; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 197 |
183 void ConnectionToClient::CloseChannels() { | 198 void ConnectionToClient::CloseChannels() { |
184 control_dispatcher_.reset(); | 199 control_dispatcher_.reset(); |
185 event_dispatcher_.reset(); | 200 event_dispatcher_.reset(); |
186 video_writer_.reset(); | 201 video_writer_.reset(); |
187 audio_writer_.reset(); | 202 audio_writer_.reset(); |
188 } | 203 } |
189 | 204 |
190 } // namespace protocol | 205 } // namespace protocol |
191 } // namespace remoting | 206 } // namespace remoting |
OLD | NEW |