| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/base/thread_impl.h" | 5 #include "cc/base/thread_impl.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 void ThreadImpl::PostDelayedTask(base::Closure cb, base::TimeDelta delay) { | 27 void ThreadImpl::PostDelayedTask(base::Closure cb, base::TimeDelta delay) { |
| 28 thread_->PostDelayedTask(FROM_HERE, cb, delay); | 28 thread_->PostDelayedTask(FROM_HERE, cb, delay); |
| 29 } | 29 } |
| 30 | 30 |
| 31 bool ThreadImpl::BelongsToCurrentThread() const { | 31 bool ThreadImpl::BelongsToCurrentThread() const { |
| 32 return thread_->BelongsToCurrentThread(); | 32 return thread_->BelongsToCurrentThread(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 base::SingleThreadTaskRunner* ThreadImpl::TaskRunner() { |
| 36 return thread_.get(); |
| 37 } |
| 38 |
| 35 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread) | 39 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread) |
| 36 : thread_(thread) {} | 40 : thread_(thread) {} |
| 37 | 41 |
| 38 } // namespace cc | 42 } // namespace cc |
| OLD | NEW |