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

Side by Side Diff: webkit/compositor_bindings/CCThreadImpl.h

Issue 11142031: Remove WTF dependencies from webkit_compositor_bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 months 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 | « no previous file | webkit/compositor_bindings/CCThreadImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "CCThread.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/threading/platform_thread.h" 6 #include "base/threading/platform_thread.h"
7 #include "cc/thread.h"
7 #include <wtf/OwnPtr.h> 8 #include <wtf/OwnPtr.h>
8 #include <wtf/Threading.h> 9 #include <wtf/PassOwnPtr.h>
9 10
10 #ifndef CCThreadImpl_h 11 #ifndef CCThreadImpl_h
11 #define CCThreadImpl_h 12 #define CCThreadImpl_h
12 13
13 namespace WebKit { 14 namespace WebKit {
14 15
15 class WebThread; 16 class WebThread;
16 17
17 // Implements CCThread in terms of WebThread. 18 // Implements CCThread in terms of WebThread.
18 class CCThreadImpl : public cc::CCThread { 19 class CCThreadImpl : public cc::CCThread {
19 public: 20 public:
20 // Creates a CCThreadImpl wrapping the current thread. 21 // Creates a CCThreadImpl wrapping the current thread.
21 static PassOwnPtr<cc::CCThread> createForCurrentThread(); 22 static scoped_ptr<cc::CCThread> createForCurrentThread();
22 23
23 // Creates a CCThread wrapping a non-current WebThread. 24 // Creates a CCThread wrapping a non-current WebThread.
24 static PassOwnPtr<cc::CCThread> createForDifferentThread(WebThread*); 25 static scoped_ptr<cc::CCThread> createForDifferentThread(WebThread*);
25 26
26 virtual ~CCThreadImpl(); 27 virtual ~CCThreadImpl();
27 virtual void postTask(PassOwnPtr<cc::CCThread::Task>); 28 virtual void postTask(PassOwnPtr<cc::CCThread::Task>);
28 virtual void postDelayedTask(PassOwnPtr<cc::CCThread::Task>, long long delay Ms); 29 virtual void postDelayedTask(PassOwnPtr<cc::CCThread::Task>, long long delay Ms);
29 base::PlatformThreadId threadID() const; 30 base::PlatformThreadId threadID() const;
30 31
31 private: 32 private:
32 CCThreadImpl(WebThread*, bool currentThread); 33 CCThreadImpl(WebThread*, bool currentThread);
33 34
34 WebThread* m_thread; 35 WebThread* m_thread;
35 base::PlatformThreadId m_threadID; 36 base::PlatformThreadId m_threadID;
36 }; 37 };
37 38
38 } // namespace WebKit 39 } // namespace WebKit
39 40
40 #endif 41 #endif
OLDNEW
« no previous file with comments | « no previous file | webkit/compositor_bindings/CCThreadImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698