| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 void ClientSession::OnSequenceNumberUpdated( | 131 void ClientSession::OnSequenceNumberUpdated( |
| 132 protocol::ConnectionToClient* connection, int64 sequence_number) { | 132 protocol::ConnectionToClient* connection, int64 sequence_number) { |
| 133 DCHECK(CalledOnValidThread()); | 133 DCHECK(CalledOnValidThread()); |
| 134 DCHECK_EQ(connection_.get(), connection); | 134 DCHECK_EQ(connection_.get(), connection); |
| 135 event_handler_->OnSessionSequenceNumber(this, sequence_number); | 135 event_handler_->OnSessionSequenceNumber(this, sequence_number); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void ClientSession::OnRouteChange( | 138 void ClientSession::OnRouteChange( |
| 139 protocol::ConnectionToClient* connection, | 139 protocol::ConnectionToClient* connection, |
| 140 const std::string& channel_name, | 140 const std::string& channel_name, |
| 141 const net::IPEndPoint& remote_end_point, | 141 const protocol::TransportRoute& route) { |
| 142 const net::IPEndPoint& local_end_point) { | |
| 143 DCHECK(CalledOnValidThread()); | 142 DCHECK(CalledOnValidThread()); |
| 144 DCHECK_EQ(connection_.get(), connection); | 143 DCHECK_EQ(connection_.get(), connection); |
| 145 event_handler_->OnSessionRouteChange(this, channel_name, remote_end_point, | 144 event_handler_->OnSessionRouteChange(this, channel_name, route); |
| 146 local_end_point); | |
| 147 } | 145 } |
| 148 | 146 |
| 149 void ClientSession::Disconnect() { | 147 void ClientSession::Disconnect() { |
| 150 DCHECK(CalledOnValidThread()); | 148 DCHECK(CalledOnValidThread()); |
| 151 DCHECK(connection_.get()); | 149 DCHECK(connection_.get()); |
| 152 authenticated_ = false; | 150 authenticated_ = false; |
| 153 RestoreEventState(); | 151 RestoreEventState(); |
| 154 | 152 |
| 155 // This triggers OnSessionClosed() and the session may be destroyed | 153 // This triggers OnSessionClosed() and the session may be destroyed |
| 156 // as the result, so this call must be the last in this method. | 154 // 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... |
| 265 mouse.set_y(remote_mouse_pos_.y()); | 263 mouse.set_y(remote_mouse_pos_.y()); |
| 266 mouse.set_button((MouseEvent::MouseButton)i); | 264 mouse.set_button((MouseEvent::MouseButton)i); |
| 267 mouse.set_button_down(false); | 265 mouse.set_button_down(false); |
| 268 host_event_stub_->InjectMouseEvent(mouse); | 266 host_event_stub_->InjectMouseEvent(mouse); |
| 269 } | 267 } |
| 270 } | 268 } |
| 271 remote_mouse_button_state_ = 0; | 269 remote_mouse_button_state_ = 0; |
| 272 } | 270 } |
| 273 | 271 |
| 274 } // namespace remoting | 272 } // namespace remoting |
| OLD | NEW |