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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 void ClientSession::OnConnectionClosed( | 103 void ClientSession::OnConnectionClosed( |
104 protocol::ConnectionToClient* connection) { | 104 protocol::ConnectionToClient* connection) { |
105 DCHECK(CalledOnValidThread()); | 105 DCHECK(CalledOnValidThread()); |
106 DCHECK_EQ(connection_.get(), connection); | 106 DCHECK_EQ(connection_.get(), connection); |
107 event_handler_->OnSessionClosed(this); | 107 event_handler_->OnSessionClosed(this); |
108 } | 108 } |
109 | 109 |
110 void ClientSession::OnConnectionFailed( | 110 void ClientSession::OnConnectionFailed( |
111 protocol::ConnectionToClient* connection, | 111 protocol::ConnectionToClient* connection, |
112 protocol::Session::Error error) { | 112 protocol::ErrorCode error) { |
113 DCHECK(CalledOnValidThread()); | 113 DCHECK(CalledOnValidThread()); |
114 DCHECK_EQ(connection_.get(), connection); | 114 DCHECK_EQ(connection_.get(), connection); |
115 if (error == protocol::Session::AUTHENTICATION_FAILED) | 115 if (error == protocol::AUTHENTICATION_FAILED) |
116 event_handler_->OnSessionAuthenticationFailed(this); | 116 event_handler_->OnSessionAuthenticationFailed(this); |
117 // TODO(sergeyu): Log failure reason? | 117 // TODO(sergeyu): Log failure reason? |
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); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 mouse.set_y(remote_mouse_pos_.y()); | 255 mouse.set_y(remote_mouse_pos_.y()); |
256 mouse.set_button((MouseEvent::MouseButton)i); | 256 mouse.set_button((MouseEvent::MouseButton)i); |
257 mouse.set_button_down(false); | 257 mouse.set_button_down(false); |
258 input_stub_->InjectMouseEvent(mouse); | 258 input_stub_->InjectMouseEvent(mouse); |
259 } | 259 } |
260 } | 260 } |
261 remote_mouse_button_state_ = 0; | 261 remote_mouse_button_state_ = 0; |
262 } | 262 } |
263 | 263 |
264 } // namespace remoting | 264 } // namespace remoting |
OLD | NEW |