Index: remoting/host/client_session.cc |
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc |
index e594b104cf63674e83ca7179ae35c5859ce751cd..11153fad4e44e5547dada86654131fcb6ce25c22 100644 |
--- a/remoting/host/client_session.cc |
+++ b/remoting/host/client_session.cc |
@@ -51,7 +51,6 @@ ClientSession::ClientSession( |
: event_handler_(event_handler), |
connection_(connection.Pass()), |
client_jid_(connection_->session()->jid()), |
- control_factory_(this), |
desktop_environment_factory_(desktop_environment_factory), |
input_tracker_(&host_input_filter_), |
remote_input_filter_(&input_tracker_), |
@@ -60,7 +59,6 @@ ClientSession::ClientSession( |
disable_clipboard_filter_(clipboard_echo_filter_.host_filter()), |
auth_input_filter_(&disable_input_filter_), |
auth_clipboard_filter_(&disable_clipboard_filter_), |
- client_clipboard_factory_(clipboard_echo_filter_.client_filter()), |
max_duration_(max_duration), |
audio_task_runner_(audio_task_runner), |
input_task_runner_(input_task_runner), |
@@ -71,7 +69,9 @@ ClientSession::ClientSession( |
pairing_registry_(pairing_registry), |
pause_video_(false), |
lossless_video_encode_(false), |
- lossless_video_color_(false) { |
+ lossless_video_color_(false), |
+ weak_factory_(this), |
+ client_clipboard_factory_(clipboard_echo_filter_.client_filter()) { |
connection_->SetEventHandler(this); |
// TODO(sergeyu): Currently ConnectionToClient expects stubs to be |
@@ -281,7 +281,7 @@ void ClientSession::OnConnectionAuthenticated( |
// Create the desktop environment. Drop the connection if it could not be |
// created for any reason (for instance the curtain could not initialize). |
desktop_environment_ = |
- desktop_environment_factory_->Create(control_factory_.GetWeakPtr()); |
+ desktop_environment_factory_->Create(weak_factory_.GetWeakPtr()); |
if (!desktop_environment_) { |
DisconnectSession(); |
return; |
@@ -362,7 +362,7 @@ void ClientSession::OnConnectionClosed( |
DCHECK_EQ(connection_.get(), connection); |
// Ignore any further callbacks. |
- control_factory_.InvalidateWeakPtrs(); |
+ weak_factory_.InvalidateWeakPtrs(); |
// If the client never authenticated then the session failed. |
if (!auth_input_filter_.enabled()) |