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_impl.h" | 5 #include "base/message_loop_proxy_impl.h" |
6 #include "base/thread_restrictions.h" | 6 #include "base/threading/thread_restrictions.h" |
7 | 7 |
8 namespace base { | 8 namespace base { |
9 | 9 |
10 MessageLoopProxyImpl::MessageLoopProxyImpl() | 10 MessageLoopProxyImpl::MessageLoopProxyImpl() |
11 : target_message_loop_(MessageLoop::current()) { | 11 : target_message_loop_(MessageLoop::current()) { |
12 target_message_loop_->AddDestructionObserver(this); | 12 target_message_loop_->AddDestructionObserver(this); |
13 } | 13 } |
14 | 14 |
15 MessageLoopProxyImpl::~MessageLoopProxyImpl() { | 15 MessageLoopProxyImpl::~MessageLoopProxyImpl() { |
16 AutoLock lock(message_loop_lock_); | 16 AutoLock lock(message_loop_lock_); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 target_message_loop_ = NULL; | 102 target_message_loop_ = NULL; |
103 } | 103 } |
104 | 104 |
105 scoped_refptr<MessageLoopProxy> | 105 scoped_refptr<MessageLoopProxy> |
106 MessageLoopProxy::CreateForCurrentThread() { | 106 MessageLoopProxy::CreateForCurrentThread() { |
107 scoped_refptr<MessageLoopProxy> ret(new MessageLoopProxyImpl()); | 107 scoped_refptr<MessageLoopProxy> ret(new MessageLoopProxyImpl()); |
108 return ret; | 108 return ret; |
109 } | 109 } |
110 | 110 |
111 } // namespace base | 111 } // namespace base |
OLD | NEW |