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/host/client_session.h" | 5 #include "remoting/host/client_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "remoting/host/capturer.h" | 10 #include "remoting/host/capturer.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 void ClientSession::OnSequenceNumberUpdated( | 121 void ClientSession::OnSequenceNumberUpdated( |
122 protocol::ConnectionToClient* connection, int64 sequence_number) { | 122 protocol::ConnectionToClient* connection, int64 sequence_number) { |
123 DCHECK(CalledOnValidThread()); | 123 DCHECK(CalledOnValidThread()); |
124 DCHECK_EQ(connection_.get(), connection); | 124 DCHECK_EQ(connection_.get(), connection); |
125 event_handler_->OnSessionSequenceNumber(this, sequence_number); | 125 event_handler_->OnSessionSequenceNumber(this, sequence_number); |
126 } | 126 } |
127 | 127 |
128 void ClientSession::OnClientIpAddress(protocol::ConnectionToClient* connection, | 128 void ClientSession::OnClientIpAddress(protocol::ConnectionToClient* connection, |
129 const std::string& channel_name, | 129 const std::string& channel_name, |
130 const net::IPEndPoint& end_point) { | 130 const net::IPEndPoint& end_point, |
| 131 const net::IPEndPoint& local_end_point) { |
131 DCHECK(CalledOnValidThread()); | 132 DCHECK(CalledOnValidThread()); |
132 DCHECK_EQ(connection_.get(), connection); | 133 DCHECK_EQ(connection_.get(), connection); |
133 event_handler_->OnSessionIpAddress(this, channel_name, end_point); | 134 event_handler_->OnSessionIpAddress(this, channel_name, end_point, |
| 135 local_end_point); |
134 } | 136 } |
135 | 137 |
136 void ClientSession::Disconnect() { | 138 void ClientSession::Disconnect() { |
137 DCHECK(CalledOnValidThread()); | 139 DCHECK(CalledOnValidThread()); |
138 DCHECK(connection_.get()); | 140 DCHECK(connection_.get()); |
139 authenticated_ = false; | 141 authenticated_ = false; |
140 RestoreEventState(); | 142 RestoreEventState(); |
141 | 143 |
142 // This triggers OnSessionClosed() and the session may be destroyed | 144 // This triggers OnSessionClosed() and the session may be destroyed |
143 // as the result, so this call must be the last in this method. | 145 // as the result, so this call must be the last in this method. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 mouse.set_y(remote_mouse_pos_.y()); | 254 mouse.set_y(remote_mouse_pos_.y()); |
253 mouse.set_button((MouseEvent::MouseButton)i); | 255 mouse.set_button((MouseEvent::MouseButton)i); |
254 mouse.set_button_down(false); | 256 mouse.set_button_down(false); |
255 input_stub_->InjectMouseEvent(mouse); | 257 input_stub_->InjectMouseEvent(mouse); |
256 } | 258 } |
257 } | 259 } |
258 remote_mouse_button_state_ = 0; | 260 remote_mouse_button_state_ = 0; |
259 } | 261 } |
260 | 262 |
261 } // namespace remoting | 263 } // namespace remoting |
OLD | NEW |