OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/jingle_glue/jingle_thread.h" | 5 #include "remoting/jingle_glue/jingle_thread.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/message_pump.h" | 10 #include "base/message_pump.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 message_loop.Run(); | 165 message_loop.Run(); |
166 | 166 |
167 stopped_event_.Signal(); | 167 stopped_event_.Signal(); |
168 | 168 |
169 task_pump_ = NULL; | 169 task_pump_ = NULL; |
170 message_loop_ = NULL; | 170 message_loop_ = NULL; |
171 } | 171 } |
172 | 172 |
173 void JingleThread::Stop() { | 173 void JingleThread::Stop() { |
174 message_loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask()); | 174 message_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
175 stopped_event_.Wait(); | 175 stopped_event_.Wait(); |
176 | 176 |
177 // This will wait until the thread is actually finished. | 177 // This will wait until the thread is actually finished. |
178 Thread::Stop(); | 178 Thread::Stop(); |
179 } | 179 } |
180 | 180 |
181 MessageLoop* JingleThread::message_loop() { | 181 MessageLoop* JingleThread::message_loop() { |
182 return message_loop_; | 182 return message_loop_; |
183 } | 183 } |
184 | 184 |
185 base::MessageLoopProxy* JingleThread::message_loop_proxy() { | 185 base::MessageLoopProxy* JingleThread::message_loop_proxy() { |
186 return message_loop_proxy_; | 186 return message_loop_proxy_; |
187 } | 187 } |
188 | 188 |
189 TaskPump* JingleThread::task_pump() { | 189 TaskPump* JingleThread::task_pump() { |
190 return task_pump_; | 190 return task_pump_; |
191 } | 191 } |
192 | 192 |
193 } // namespace remoting | 193 } // namespace remoting |
OLD | NEW |