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

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

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android build fix Created 4 years, 4 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 private: 126 private:
127 AsyncMethodRunner(TargetClass* object, TargetMethod method) 127 AsyncMethodRunner(TargetClass* object, TargetMethod method)
128 : m_timer(this, &AsyncMethodRunner<TargetClass>::fired) 128 : m_timer(this, &AsyncMethodRunner<TargetClass>::fired)
129 , m_object(object) 129 , m_object(object)
130 , m_method(method) 130 , m_method(method)
131 , m_suspended(false) 131 , m_suspended(false)
132 , m_runWhenResumed(false) 132 , m_runWhenResumed(false)
133 { 133 {
134 } 134 }
135 135
136 void fired(Timer<AsyncMethodRunner<TargetClass>>*) 136 void fired(TimerBase*)
137 { 137 {
138 (m_object->*m_method)(); 138 (m_object->*m_method)();
139 } 139 }
140 140
141 Timer<AsyncMethodRunner<TargetClass>> m_timer; 141 Timer<AsyncMethodRunner<TargetClass>> m_timer;
142 142
143 Member<TargetClass> m_object; 143 Member<TargetClass> m_object;
144 TargetMethod m_method; 144 TargetMethod m_method;
145 145
146 bool m_suspended; 146 bool m_suspended;
147 bool m_runWhenResumed; 147 bool m_runWhenResumed;
148 }; 148 };
149 149
150 } // namespace blink 150 } // namespace blink
151 151
152 #endif 152 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698