OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 session_->Pause(); | 89 session_->Pause(); |
90 } | 90 } |
91 | 91 |
92 // Also remove reference to ClientConnection from this object. | 92 // Also remove reference to ClientConnection from this object. |
93 client_ = NULL; | 93 client_ = NULL; |
94 } | 94 } |
95 | 95 |
96 //////////////////////////////////////////////////////////////////////////// | 96 //////////////////////////////////////////////////////////////////////////// |
97 // ClientConnection::EventHandler implementations | 97 // ClientConnection::EventHandler implementations |
98 void ChromotingHost::HandleMessages(ClientConnection* client, | 98 void ChromotingHost::HandleMessages(ClientConnection* client, |
99 ClientMessageList* messages) { | 99 ClientMessageList* messages) { |
100 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); | 100 DCHECK_EQ(context_->main_message_loop(), MessageLoop::current()); |
101 | 101 |
102 // Delegate the messages to EventExecutor and delete the unhandled | 102 // Delegate the messages to EventExecutor and delete the unhandled |
103 // messages. | 103 // messages. |
104 DCHECK(executor_.get()); | 104 DCHECK(executor_.get()); |
105 executor_->HandleInputEvents(messages); | 105 executor_->HandleInputEvents(messages); |
106 STLDeleteElements<ClientMessageList>(messages); | 106 STLDeleteElements<ClientMessageList>(messages); |
107 } | 107 } |
108 | 108 |
109 void ChromotingHost::OnConnectionOpened(ClientConnection* client) { | 109 void ChromotingHost::OnConnectionOpened(ClientConnection* client) { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 jingle_client_->Close(); | 255 jingle_client_->Close(); |
256 } | 256 } |
257 | 257 |
258 // Lastly call the shutdown task. | 258 // Lastly call the shutdown task. |
259 if (shutdown_task_.get()) { | 259 if (shutdown_task_.get()) { |
260 shutdown_task_->Run(); | 260 shutdown_task_->Run(); |
261 } | 261 } |
262 } | 262 } |
263 | 263 |
264 } // namespace remoting | 264 } // namespace remoting |
OLD | NEW |