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 "base/message_loop_proxy.h" | 5 #include "base/message_loop_proxy.h" |
6 | 6 |
| 7 #include "base/bind.h" |
| 8 |
7 namespace base { | 9 namespace base { |
8 | 10 |
9 MessageLoopProxy::MessageLoopProxy() { | 11 MessageLoopProxy::MessageLoopProxy() { |
10 } | 12 } |
11 | 13 |
12 MessageLoopProxy::~MessageLoopProxy() { | 14 MessageLoopProxy::~MessageLoopProxy() { |
13 } | 15 } |
14 | 16 |
| 17 bool MessageLoopProxy::PostTaskAndReply( |
| 18 const tracked_objects::Location& from_here, |
| 19 const Closure& task, |
| 20 const Closure& reply) { |
| 21 internal::PostTaskAndReplyRelay* relay = |
| 22 new internal::PostTaskAndReplyRelay(from_here, task, reply); |
| 23 return PostTask(from_here, base::Bind(&internal::PostTaskAndReplyRelay::Run, |
| 24 base::Unretained(relay))); |
| 25 } |
| 26 |
15 void MessageLoopProxy::OnDestruct() const { | 27 void MessageLoopProxy::OnDestruct() const { |
16 delete this; | 28 delete this; |
17 } | 29 } |
18 | 30 |
19 } // namespace base | 31 } // namespace base |
OLD | NEW |