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

Side by Side Diff: cc/thread_impl.h

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
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 #ifndef CC_THREAD_IMPL_H_
6 #define CC_THREAD_IMPL_H_
7
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop_proxy.h"
11 #include "cc/thread.h"
12
13 namespace cc {
14
15 // Implements cc::Thread in terms of base::MessageLoopProxy.
16 class ThreadImpl : public Thread {
17 public:
18 // Creates a ThreadImpl wrapping the current thread.
19 static scoped_ptr<cc::Thread> createForCurrentThread();
20
21 // Creates a Thread wrapping a non-current thread.
22 static scoped_ptr<cc::Thread> createForDifferentThread(scoped_refptr<base::M essageLoopProxy> thread);
23
24 virtual ~ThreadImpl();
25
26 // cc::Thread implementation
27 virtual void postTask(base::Closure cb) OVERRIDE;
28 virtual void postDelayedTask(base::Closure cb, long long delayMs) OVERRIDE;
29 virtual bool belongsToCurrentThread() const OVERRIDE;
30
31 private:
32 explicit ThreadImpl(scoped_refptr<base::MessageLoopProxy> thread);
33
34 scoped_refptr<base::MessageLoopProxy> m_thread;
35 };
36
37 } // namespace cc
38
39 #endif // CC_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698