| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 void didChangeAlignmentInterval(double now); | 73 void didChangeAlignmentInterval(double now); |
| 74 | 74 |
| 75 struct PLATFORM_EXPORT Comparator { | 75 struct PLATFORM_EXPORT Comparator { |
| 76 bool operator()(const TimerBase* a, const TimerBase* b) const; | 76 bool operator()(const TimerBase* a, const TimerBase* b) const; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 virtual void fired() = 0; | 80 virtual void fired() = 0; |
| 81 | 81 |
| 82 virtual WebTaskRunner* timerTaskRunner(); |
| 83 |
| 82 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 84 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 83 virtual bool canFire() const { return true; } | 85 virtual bool canFire() const { return true; } |
| 84 | 86 |
| 85 virtual double alignedFireTime(double fireTime) const { return fireTime; } | 87 virtual double alignedFireTime(double fireTime) const { return fireTime; } |
| 86 | 88 |
| 87 void setNextFireTime(double now, double delay); | 89 void setNextFireTime(double now, double delay); |
| 88 | 90 |
| 89 void runInternal(); | 91 void runInternal(); |
| 90 | 92 |
| 91 class CancellableTimerTask final : public WebTaskRunner::Task { | 93 class CancellableTimerTask final : public WebTaskRunner::Task { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 188 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 187 inline bool TimerBase::isActive() const | 189 inline bool TimerBase::isActive() const |
| 188 { | 190 { |
| 189 ASSERT(m_thread == currentThread()); | 191 ASSERT(m_thread == currentThread()); |
| 190 return m_cancellableTimerTask; | 192 return m_cancellableTimerTask; |
| 191 } | 193 } |
| 192 | 194 |
| 193 } // namespace blink | 195 } // namespace blink |
| 194 | 196 |
| 195 #endif // Timer_h | 197 #endif // Timer_h |
| OLD | NEW |