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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 event_handler_->OnSessionClosed(this); | 118 event_handler_->OnSessionClosed(this); |
119 } | 119 } |
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::OnRouteChange( |
129 const std::string& channel_name, | 129 protocol::ConnectionToClient* connection, |
130 const net::IPEndPoint& end_point) { | 130 const std::string& channel_name, |
| 131 const net::IPEndPoint& remote_end_point, |
| 132 const net::IPEndPoint& local_end_point) { |
131 DCHECK(CalledOnValidThread()); | 133 DCHECK(CalledOnValidThread()); |
132 DCHECK_EQ(connection_.get(), connection); | 134 DCHECK_EQ(connection_.get(), connection); |
133 event_handler_->OnSessionIpAddress(this, channel_name, end_point); | 135 event_handler_->OnSessionRouteChange(this, channel_name, remote_end_point, |
| 136 local_end_point); |
134 } | 137 } |
135 | 138 |
136 void ClientSession::Disconnect() { | 139 void ClientSession::Disconnect() { |
137 DCHECK(CalledOnValidThread()); | 140 DCHECK(CalledOnValidThread()); |
138 DCHECK(connection_.get()); | 141 DCHECK(connection_.get()); |
139 authenticated_ = false; | 142 authenticated_ = false; |
140 RestoreEventState(); | 143 RestoreEventState(); |
141 | 144 |
142 // This triggers OnSessionClosed() and the session may be destroyed | 145 // This triggers OnSessionClosed() and the session may be destroyed |
143 // as the result, so this call must be the last in this method. | 146 // 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()); | 255 mouse.set_y(remote_mouse_pos_.y()); |
253 mouse.set_button((MouseEvent::MouseButton)i); | 256 mouse.set_button((MouseEvent::MouseButton)i); |
254 mouse.set_button_down(false); | 257 mouse.set_button_down(false); |
255 input_stub_->InjectMouseEvent(mouse); | 258 input_stub_->InjectMouseEvent(mouse); |
256 } | 259 } |
257 } | 260 } |
258 remote_mouse_button_state_ = 0; | 261 remote_mouse_button_state_ = 0; |
259 } | 262 } |
260 | 263 |
261 } // namespace remoting | 264 } // namespace remoting |
OLD | NEW |