Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(969)

Side by Side Diff: cc/thread_impl.cc

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix webkit_compositor_bindings_unittests Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/thread_impl.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/thread_impl.h"
6
7 #include "base/message_loop.h"
8
9 namespace cc {
10
11 scoped_ptr<Thread> ThreadImpl::createForCurrentThread()
12 {
13 return scoped_ptr<Thread>(new ThreadImpl(base::MessageLoopProxy::current())) .Pass();
14 }
15
16 scoped_ptr<Thread> ThreadImpl::createForDifferentThread(scoped_refptr<base::Mess ageLoopProxy> thread)
17 {
18 return scoped_ptr<Thread>(new ThreadImpl(thread)).Pass();
19 }
20
21 ThreadImpl::~ThreadImpl()
22 {
23 }
24
25 void ThreadImpl::postTask(base::Closure cb)
26 {
27 m_thread->PostTask(FROM_HERE, cb);
28 }
29
30 void ThreadImpl::postDelayedTask(base::Closure cb, long long delayMs)
31 {
32 m_thread->PostDelayedTask(FROM_HERE, cb, base::TimeDelta::FromMilliseconds(d elayMs));
33 }
34
35 bool ThreadImpl::belongsToCurrentThread() const
36 {
37 return m_thread->BelongsToCurrentThread();
38 }
39
40 ThreadImpl::ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread)
41 : m_thread(thread)
42 {
43 }
44
45 } // namespace cc
OLDNEW
« no previous file with comments | « cc/thread_impl.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698