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

Side by Side Diff: third_party/WebKit/Source/platform/AsyncMethodRunner.h

Issue 1860903002: Update Source/platform/ to assume Oilpan only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back out ScrollAnimatorMac() accidental change Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 m_timer.stop(); 113 m_timer.stop();
114 } 114 }
115 115
116 bool isActive() const 116 bool isActive() const
117 { 117 {
118 return m_timer.isActive(); 118 return m_timer.isActive();
119 } 119 }
120 120
121 DEFINE_INLINE_TRACE() 121 DEFINE_INLINE_TRACE()
122 { 122 {
123 #if ENABLE(OILPAN)
124 visitor->trace(m_object); 123 visitor->trace(m_object);
125 #else
126 TraceIfNeeded<typename RawPtrOrMemberTrait<TargetClass>::Type>::trace(vi sitor, m_object);
127 #endif
128 } 124 }
129 125
130 private: 126 private:
131 AsyncMethodRunner(TargetClass* object, TargetMethod method) 127 AsyncMethodRunner(TargetClass* object, TargetMethod method)
132 : m_timer(this, &AsyncMethodRunner<TargetClass>::fired) 128 : m_timer(this, &AsyncMethodRunner<TargetClass>::fired)
133 , m_object(object) 129 , m_object(object)
134 , m_method(method) 130 , m_method(method)
135 , m_suspended(false) 131 , m_suspended(false)
136 , m_runWhenResumed(false) 132 , m_runWhenResumed(false)
137 { 133 {
138 } 134 }
139 135
140 void fired(Timer<AsyncMethodRunner<TargetClass>>*) 136 void fired(Timer<AsyncMethodRunner<TargetClass>>*)
141 { 137 {
142 (m_object->*m_method)(); 138 (m_object->*m_method)();
143 } 139 }
144 140
145 Timer<AsyncMethodRunner<TargetClass>> m_timer; 141 Timer<AsyncMethodRunner<TargetClass>> m_timer;
146 142
147 #if ENABLE(OILPAN)
148 Member<TargetClass> m_object; 143 Member<TargetClass> m_object;
149 #else
150 typename RawPtrOrMemberTrait<TargetClass>::Type m_object;
151 #endif
152 TargetMethod m_method; 144 TargetMethod m_method;
153 145
154 bool m_suspended; 146 bool m_suspended;
155 bool m_runWhenResumed; 147 bool m_runWhenResumed;
156 }; 148 };
157 149
158 } // namespace blink 150 } // namespace blink
159 151
160 #endif 152 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | third_party/WebKit/Source/platform/MemoryPurgeController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698