Lines Matching defs:WorkItem
31 class WorkItem {
34 static PassOwnPtr<WorkItem> create(C*, void (C::*)());
37 static PassOwnPtr<WorkItem> create(C*, void (C::*)(T0), T0);
40 static PassOwnPtr<WorkItem> create(C*, void (C::*)(T0, T1), T0, T1);
42 static PassOwnPtr<WorkItem> create(void (*)());
44 virtual ~WorkItem() { }
48 WorkItem() { }
51 WorkItem(const WorkItem&);
52 WorkItem& operator=(const WorkItem&);
56 class MemberFunctionWorkItem0 : private WorkItem {
57 // We only allow WorkItem to create this.
58 friend class WorkItem;
84 class MemberFunctionWorkItem1 : private WorkItem {
85 // We only allow WorkItem to create this.
86 friend class WorkItem;
114 class MemberFunctionWorkItem2 : private WorkItem {
115 // We only allow WorkItem to create this.
116 friend class WorkItem;
146 PassOwnPtr<WorkItem> WorkItem::create(C* ptr, void (C::*function)())
148 return adoptPtr(static_cast<WorkItem*>(new MemberFunctionWorkItem0<C>(ptr, function)));
152 PassOwnPtr<WorkItem> WorkItem::create(C* ptr, void (C::*function)(T0), T0 t0)
154 return adoptPtr(static_cast<WorkItem*>(new MemberFunctionWorkItem1<C, T0>(ptr, function, t0)));
158 PassOwnPtr<WorkItem> WorkItem::create(C* ptr, void (C::*function)(T0, T1), T0 t0, T1 t1)
160 return adoptPtr(static_cast<WorkItem*>(new MemberFunctionWorkItem2<C, T0, T1>(ptr, function, t0, t1)));
163 class FunctionWorkItem0 : private WorkItem {
164 // We only allow WorkItem to create this.
165 friend class WorkItem;
182 inline PassOwnPtr<WorkItem> WorkItem::create(void (*function)())
184 return adoptPtr(static_cast<WorkItem*>(new FunctionWorkItem0(function)));