OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return false; | 56 return false; |
57 } | 57 } |
58 OnStop(); | 58 OnStop(); |
59 worker_thread_->Clear(this, MSG_HAVEWORK); | 59 worker_thread_->Clear(this, MSG_HAVEWORK); |
60 worker_thread_ = NULL; | 60 worker_thread_ = NULL; |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 void Worker::HaveWork() { | 64 void Worker::HaveWork() { |
65 ASSERT(worker_thread_ != NULL); | 65 ASSERT(worker_thread_ != NULL); |
66 worker_thread_->Post(this, MSG_HAVEWORK); | 66 worker_thread_->Post(RTC_FROM_HERE, this, MSG_HAVEWORK); |
67 } | 67 } |
68 | 68 |
69 void Worker::OnMessage(rtc::Message *msg) { | 69 void Worker::OnMessage(rtc::Message *msg) { |
70 ASSERT(msg->message_id == MSG_HAVEWORK); | 70 ASSERT(msg->message_id == MSG_HAVEWORK); |
71 ASSERT(worker_thread_ == rtc::Thread::Current()); | 71 ASSERT(worker_thread_ == rtc::Thread::Current()); |
72 OnHaveWork(); | 72 OnHaveWork(); |
73 } | 73 } |
74 | 74 |
75 } // namespace rtc | 75 } // namespace rtc |
OLD | NEW |